acf_field_button_group::initializepublicACF 5.6.3

This function will setup the field type data

Метод класса: acf_field_button_group{}

Хуков нет.

Возвращает

null. Ничего (null).

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

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

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

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

Код acf_field_button_group::initialize() ACF 6.4.2

function initialize() {

	// vars
	$this->name          = 'button_group';
	$this->label         = __( 'Button Group', 'acf' );
	$this->category      = 'choice';
	$this->description   = __( 'A group of buttons with values that you specify, users can choose one option from the values provided.', 'acf' );
	$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-button-group.png';
	$this->doc_url       = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/button-group/', 'docs', 'field-type-selection' );
	$this->defaults      = array(
		'choices'       => array(),
		'default_value' => '',
		'allow_null'    => 0,
		'return_format' => 'value',
		'layout'        => 'horizontal',
	);
}