acf_field_radio::initializepublicACF 5.0.0

This function will setup the field type data

Method of the class: acf_field_radio{}

No Hooks.

Returns

n/a.

Usage

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

Changelog

Since 5.0.0 Introduced.

acf_field_radio::initialize() code ACF 6.8.8

function initialize() {

	// vars
	$this->name          = 'radio';
	$this->label         = __( 'Radio Button', 'acf' );
	$this->category      = 'choice';
	$this->description   = __( 'A group of radio button inputs that allows the user to make a single selection from values that you specify.', 'acf' );
	$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-radio-button.png';
	$this->doc_url       = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/radio-button/', 'docs', 'field-type-selection' );
	$this->defaults      = array(
		'layout'            => 'vertical',
		'choices'           => array(),
		'default_value'     => '',
		'other_choice'      => 0,
		'save_other_choice' => 0,
		'allow_null'        => 0,
		'return_format'     => 'value',
	);
}