Server IP : 104.21.38.3 / Your IP : 108.162.226.227 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/coircraft.com/wp-content/plugins/caldera-forms/classes/admin/ |
Upload File : |
<?php /** * Class Caldera_Forms_Admin_Privacy * * Sets up privacy related fields in form editor */ class Caldera_Forms_Admin_Privacy{ /** * Fields to output the personally identifying info checkbox on * * @since 1.6.1 * * @var array */ private $fields_to_show_personally_identifying_question; /** * Form config * * @since 1.6.1 * * @var array */ protected $form; /** * Caldera_Forms_Admin_Privacy constructor. * * @since 1.6.1 * * @param array $form */ public function __construct( array $form ) { $this->form = $form; } /** * Output the field template for the privacy field as needed * * @since 1.6.1 * * @uses "caldera_forms_field_wrapper_before_field_setup" action * * @param array $config Field config's config * @param string $type Field Type * @param string $field_id Field ID */ public function add_personally_identifying_question($config, $type, $field_id ){ if(in_array( $type, $this->fields_to_show_personally_identifying_question() )){ $id_attr = $field_id . '_' . Caldera_Forms_Field_Util::CONFIG_PERSONAL; $description_id_attr = $id_attr . '_description'; $is_personally_identifying = Caldera_Forms_Field_Util::is_personally_identifying($field_id, $this->form ); /* translators: it's abbreviation for Personally Identifying Information */ $pii_text = esc_html__( 'PII', 'caldera-forms' ); printf( ' <div class="caldera-config-group privacy-field personally-identifying-field"> <label for="%s"> %s </label> <div class="caldera-config-field"> <input type="checkbox" class="field-config field-checkbox" id="%s" name="%s" value="1" aria-describedby="%s" %s /> <p id="%s" class="description"> %s </p> </div> </div> ', esc_attr( $id_attr ), $pii_text, esc_attr( $id_attr ), sprintf( 'config[fields][%s][config][%s]', esc_attr($field_id), esc_attr( Caldera_Forms_Field_Util::CONFIG_PERSONAL ) ), esc_attr($description_id_attr), $is_personally_identifying ? 'checked=checked' : '', esc_attr($description_id_attr), sprintf( '%s <a href="%s" target="_blank">%s</a>', esc_html__( 'Does field contain Personally Identifying Information (PII)?', 'caldera-forms' ), 'https://calderaforms.com/gdpr#pii?utm_source=wp-admin&utm_medium=form-editor&utm_content=pii-learn-more', esc_html__( 'Learn More', 'caldera-forms' ) ) ); } } /** * Get the fields to show privacy field on * * Lazy-sets the $fields_to_show_personally_identifying_question property * * @since 1.6.1 * * @return array */ protected function fields_to_show_personally_identifying_question(){ if( ! $this->fields_to_show_personally_identifying_question ){ $this->fields_to_show_personally_identifying_question = array(); foreach( Caldera_Forms_Fields::get_all() as $field_type => $field_config ){ if ( Caldera_Forms_Fields::not_support( $field_type, 'entry_list' ) ){ continue; } if( in_array( $field_type, array( 'recaptcha', 'gdpr' ) ) ){ continue; } $this->fields_to_show_personally_identifying_question[] = $field_type; } } return $this->fields_to_show_personally_identifying_question; } }