acf_field::__construct()
__construct
This function will initialize the field type
Метод класса: acf_field{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$acf_field = new acf_field(); $acf_field->__construct();
Список изменений
С версии 5.0.0 | Введена. |
Код acf_field::__construct() acf field:: construct ACF 6.0.4
function __construct() { // initialize $this->initialize(); // register info acf_register_field_type_info( array( 'label' => $this->label, 'name' => $this->name, 'category' => $this->category, 'public' => $this->public, ) ); // value $this->add_field_filter( 'acf/load_value', array( $this, 'load_value' ), 10, 3 ); $this->add_field_filter( 'acf/update_value', array( $this, 'update_value' ), 10, 3 ); $this->add_field_filter( 'acf/format_value', array( $this, 'format_value' ), 10, 3 ); $this->add_field_filter( 'acf/validate_value', array( $this, 'validate_value' ), 10, 4 ); $this->add_field_action( 'acf/delete_value', array( $this, 'delete_value' ), 10, 3 ); // field $this->add_field_filter( 'acf/validate_rest_value', array( $this, 'validate_rest_value' ), 10, 3 ); $this->add_field_filter( 'acf/validate_field', array( $this, 'validate_field' ), 10, 1 ); $this->add_field_filter( 'acf/load_field', array( $this, 'load_field' ), 10, 1 ); $this->add_field_filter( 'acf/update_field', array( $this, 'update_field' ), 10, 1 ); $this->add_field_filter( 'acf/duplicate_field', array( $this, 'duplicate_field' ), 10, 1 ); $this->add_field_action( 'acf/delete_field', array( $this, 'delete_field' ), 10, 1 ); $this->add_field_action( 'acf/render_field', array( $this, 'render_field' ), 9, 1 ); $this->add_field_action( 'acf/render_field_settings', array( $this, 'render_field_settings' ), 9, 1 ); $this->add_field_action( 'acf/render_field_general_settings', array( $this, 'render_field_general_settings' ), 9, 1 ); $this->add_field_action( 'acf/render_field_validation_settings', array( $this, 'render_field_validation_settings' ), 9, 1 ); $this->add_field_action( 'acf/render_field_presentation_settings', array( $this, 'render_field_presentation_settings' ), 9, 1 ); $this->add_field_action( 'acf/render_field_conditional_logic_settings', array( $this, 'render_field_conditional_logic_settings' ), 9, 1 ); $this->add_field_filter( 'acf/prepare_field', array( $this, 'prepare_field' ), 10, 1 ); $this->add_field_filter( 'acf/translate_field', array( $this, 'translate_field' ), 10, 1 ); // input actions $this->add_action( 'acf/input/admin_enqueue_scripts', array( $this, 'input_admin_enqueue_scripts' ), 10, 0 ); $this->add_action( 'acf/input/admin_head', array( $this, 'input_admin_head' ), 10, 0 ); $this->add_action( 'acf/input/form_data', array( $this, 'input_form_data' ), 10, 1 ); $this->add_filter( 'acf/input/admin_l10n', array( $this, 'input_admin_l10n' ), 10, 1 ); $this->add_action( 'acf/input/admin_footer', array( $this, 'input_admin_footer' ), 10, 1 ); // field group actions $this->add_action( 'acf/field_group/admin_enqueue_scripts', array( $this, 'field_group_admin_enqueue_scripts' ), 10, 0 ); $this->add_action( 'acf/field_group/admin_head', array( $this, 'field_group_admin_head' ), 10, 0 ); $this->add_action( 'acf/field_group/admin_footer', array( $this, 'field_group_admin_footer' ), 10, 0 ); }