acf_field_button_group::initialize
This function will setup the field type data
Method of the class: acf_field_button_group{}
No Hooks.
Returns
null. Nothing (null).
Usage
$acf_field_button_group = new acf_field_button_group(); $acf_field_button_group->initialize();
Changelog
| Since 5.6.3 | Introduced. |
acf_field_button_group::initialize() acf field button group::initialize code ACF 6.8.8
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',
);
}