| Server IP : 43.130.17.34 / Your IP : 216.73.217.6 Web Server : nginx/1.28.0 System : Linux VM-4-12-opencloudos 6.6.92-34.1.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 25 21:32:13 CST 2025 x86_64 User : www ( 1000) PHP Version : 8.0.26 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 : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/yespkg.com/wp-content/plugins/wpforms/src/Pro/Forms/Fields/Base/ |
Upload File : |
<?php
namespace WPForms\Pro\Forms\Fields\Base;
/**
* Editing field entries.
*
* @since 1.6.0
*/
class EntriesEdit {
/**
* WPForms Field object.
*
* @since 1.6.0
*
* @var \WPForms_Field
*/
protected $field_object;
/**
* Constructor.
*
* @since 1.6.0
*
* @param string $type Field type.
*/
public function __construct( $type = '' ) {
if ( ! empty( $type ) ) {
$this->field_object = apply_filters( "wpforms_fields_get_field_object_{$type}", null );
}
}
/**
* Enqueues for the Edit Entry page.
*
* @since 1.6.0
*/
public function enqueues() {}
/**
* Display the field on the Edit Entry page.
*
* @since 1.6.0
*
* @param array $entry_field Entry field data.
* @param array $field Field data and settings.
* @param array $form_data Form data and settings.
*/
public function field_display( $entry_field, $field, $form_data ) {
$value = isset( $entry_field['value'] ) ? $entry_field['value'] : '';
if ( $value !== '' ) {
$field['properties'] = $this->field_object->get_field_populated_single_property_value_public( (string) $value, 'primary', $field['properties'], $field );
}
$this->field_object->field_display( $field, null, $form_data );
}
/**
* Validate submitted field data on edit entry page.
*
* @since 1.6.0
*
* @param int $field_id Field ID.
* @param mixed $field_submit Field value that was submitted.
* @param mixed $field_data Existing field data.
* @param array $form_data Form data and settings.
*/
public function validate( $field_id, $field_submit, $field_data, $form_data ) {
$this->field_object->validate( $field_id, $field_submit, $form_data );
}
/**
* Format and sanitize field while processing edit entry.
*
* @since 1.6.0
*
* @param int $field_id Field ID.
* @param mixed $field_submit Field value that was submitted.
* @param mixed $field_data Existing field data.
* @param array $form_data Form data and settings.
*/
public function format( $field_id, $field_submit, $field_data, $form_data ) {
$this->field_object->format( $field_id, $field_submit, $form_data );
}
}