acf_field__group::initialize │ public │ ACF 5.0.0

This function will setup the field type data

Method of the class: acf_field__group{}

No Hooks.

Returns

n/a.

Usage

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

Changelog

Since 5.0.0 Introduced.

acf_field__group::initialize() code ACF 6.8.8

function initialize() {

	// vars
	$this->name          = 'group';
	$this->label         = __( 'Group', 'acf' );
	$this->category      = 'layout';
	$this->description   = __( 'Provides a way to structure fields into groups to better organize the data and the edit screen.', 'acf' );
	$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-group.png';
	$this->doc_url       = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/group/', 'docs', 'field-type-selection' );
	$this->supports      = array(
		'bindings' => false,
	);
	$this->defaults      = array(
		'sub_fields' => array(),
		'layout'     => 'block',
	);
	$this->have_rows     = 'single';

	// 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' ) );
}