Server IP : 104.21.38.3 / Your IP : 162.158.170.16 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/api/ |
Upload File : |
<?php /** * Class Caldera_Forms_API_Privacy * * Form config abstraction for working with privacy settings of form */ class Caldera_Forms_API_Privacy extends Caldera_Forms_API_Form { /** * Report if this form has privacy/GDPR exporter enabled * * @since 1.7.0 * * @return true */ public function is_privacy_exporter_enabled() { return Caldera_Forms_Forms::is_privacy_export_enabled( $this->form ); } /** * Enable privacy export for this form * * @since 1.7.0 * * @return Caldera_Forms_API_Privacy */ public function enable_privacy_exporter() { $this->form = Caldera_Forms_Forms::update_privacy_export_enabled($this->form, true ); return $this->save_form(); } /** * Disable privacy export for this form. * * @return Caldera_Forms_API_Privacy */ public function disable_privacy_exporter() { $this->form = Caldera_Forms_Forms::update_privacy_export_enabled($this->form, false ); return $this->save_form(); } /** * Get IDs of the fields that can contain personally identifying fields * * @since 1.7.0 * * @return array */ public function get_pii_fields() { return Caldera_Forms_Forms::personally_identifying_fields($this->form, true ); } /** * Get IDs of the fields that can contain email we can use to identify whose personally identifying info a form contains. * * @since 1.7.0 * * @return array */ public function get_email_identifying_fields() { return Caldera_Forms_Forms::email_identifying_fields($this->form, true ); } /** * (re)set PII fields of form * * @since 1.7.0 * * @param array $pii_fields New value * @return $this */ public function set_pii_fields($pii_fields ){ foreach( $this->get_fields() as $field ){ $this->form[ 'fields' ][ $field[ 'ID' ] ][ 'config' ][ Caldera_Forms_Field_Util::CONFIG_PERSONAL] = (int) in_array( $field[ 'ID' ], $pii_fields ); } $this->set_fields(); return $this; } /** * (re)set email identifying field(s) of form * * @since 1.7.0 * * @param array $email_fields New value * @return $this */ public function set_email_identifying_fields( $email_fields ) { foreach( $this->get_fields() as $field ){ $this->form[ 'fields' ][ $field[ 'ID' ] ][ 'config' ][ Caldera_Forms_Field_Util::CONFIG_EMAIL_IDENTIFIER ] = (int) in_array( $field[ 'ID' ], $email_fields ); } $this->set_fields(); return $this; } /** @inheritdoc */ public function toArray() { return array( 'ID' => caldera_forms_very_safe_string($this->form[ 'ID' ]), 'name' => isset( $this->form[ 'name' ] ) ? caldera_forms_very_safe_string( $this->form[ 'name' ] ) : '', 'fields' => $this->get_fields(), 'emailIdentifyingFields' => $this->get_email_identifying_fields(), 'piiFields' => $this->get_pii_fields(), 'privacyExporterEnabled' => $this->is_privacy_exporter_enabled() ); } /** @inheritdoc */ public function set_fields() { foreach (Caldera_Forms_Forms::get_fields($this->form, true) as $field_id => $field) { if (Caldera_Forms_Fields::not_support(Caldera_Forms_Field_Util::get_type($field, $this->form), 'entry_list')) { continue; } $this->fields[$field_id] = [ 'ID' => caldera_forms_very_safe_string($field_id), 'name' => isset($field['label']) ? caldera_forms_very_safe_string($field['label']) : '', 'type' => Caldera_Forms_Field_Util::get_type($field, $this->form) ]; } } }