acf_field_relationship::initialize() public ACF 5.0.0
__construct
This function will setup the field type data
{} Это метод класса: acf_field_relationship{}
Хуков нет.
Возвращает
n/a.
Использование
$acf_field_relationship = new acf_field_relationship(); $acf_field_relationship->initialize();
Список изменений
С версии 5.0.0 | Введена. |
Код acf_field_relationship::initialize() acf field relationship::initialize ACF 5.9.1
function initialize() {
// vars
$this->name = 'relationship';
$this->label = __("Relationship",'acf');
$this->category = 'relational';
$this->defaults = array(
'post_type' => array(),
'taxonomy' => array(),
'min' => 0,
'max' => 0,
'filters' => array('search', 'post_type', 'taxonomy'),
'elements' => array(),
'return_format' => 'object'
);
// extra
add_action('wp_ajax_acf/fields/relationship/query', array($this, 'ajax_query'));
add_action('wp_ajax_nopriv_acf/fields/relationship/query', array($this, 'ajax_query'));
}