acf_field_repeater::initialize()publicACF 5.0.0

__construct

This function will setup the field type data

@type    function

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

Хуков нет.

Возвращает

null. Ничего.

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

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

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

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

Код acf_field_repeater::initialize() ACF 5.10.2

function initialize() {

	// vars
	$this->name     = 'repeater';
	$this->label    = __( 'Repeater', 'acf' );
	$this->category = 'layout';
	$this->defaults = array(
		'sub_fields'   => array(),
		'min'          => 0,
		'max'          => 0,
		'layout'       => 'table',
		'button_label' => '',
		'collapsed'    => '',
	);

	// field filters
	$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' ) );

	// filters
	$this->add_filter( 'acf/validate_field', array( $this, 'validate_any_field' ) );

}