WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

acf_field_flexible_content::initialize() public ACF 5.0.0

__construct

This function will setup the field type data

{} Это метод класса: acf_field_flexible_content{}

Хуков нет.

Возвращает

n/a.

Использование

$acf_field_flexible_content = new acf_field_flexible_content();
$acf_field_flexible_content->initialize();

Список изменений

С версии 5.0.0 Введена.

Код acf_field_flexible_content::initialize() ACF 5.9.1

<?php
function initialize() {
	
	// vars
	$this->name = 'flexible_content';
	$this->label = __("Flexible Content",'acf');
	$this->category = 'layout';
	$this->defaults = array(
		'layouts'		=> array(),
		'min'			=> '',
		'max'			=> '',
		'button_label'	=> __("Add Row",'acf'),
	);
	
	
	// ajax
	$this->add_action('wp_ajax_acf/fields/flexible_content/layout_title',			array($this, 'ajax_layout_title'));
	$this->add_action('wp_ajax_nopriv_acf/fields/flexible_content/layout_title',	array($this, 'ajax_layout_title'));
	
	
	// filters
	$this->add_filter('acf/prepare_field_for_export',	array($this, 'prepare_any_field_for_export'));
	$this->add_filter('acf/clone_field', 				array($this, 'clone_any_field'), 10, 2);
	$this->add_filter('acf/validate_field',					array($this, 'validate_any_field'));
	
	
	// field filters
	$this->add_field_filter('acf/get_sub_field', 			array($this, 'get_sub_field'), 10, 3);
	$this->add_field_filter('acf/prepare_field_for_export', array($this, 'prepare_field_for_export'));
	$this->add_field_filter('acf/prepare_field_for_import', array($this, 'prepare_field_for_import'));
	
}