acf_field_select::initialize() public ACF 5.0.0
__construct
This function will setup the field type data
{} Это метод класса: acf_field_select{}
Хуков нет.
Возвращает
n/a.
Использование
$acf_field_select = new acf_field_select(); $acf_field_select->initialize();
Список изменений
С версии 5.0.0 | Введена. |
Код acf_field_select::initialize() acf field select::initialize ACF 5.9.1
function initialize() {
// vars
$this->name = 'select';
$this->label = _x('Select', 'noun', 'acf');
$this->category = 'choice';
$this->defaults = array(
'multiple' => 0,
'allow_null' => 0,
'choices' => array(),
'default_value' => '',
'ui' => 0,
'ajax' => 0,
'placeholder' => '',
'return_format' => 'value'
);
// ajax
add_action('wp_ajax_acf/fields/select/query', array($this, 'ajax_query'));
add_action('wp_ajax_nopriv_acf/fields/select/query', array($this, 'ajax_query'));
}