acf_field_checkbox::initializepublicACF 5.0.0

__construct

This function will setup the field type data

Method of the class: acf_field_checkbox{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Changelog

Since 5.0.0 Introduced.

acf_field_checkbox::initialize() code ACF 6.0.4

function initialize() {

	// vars
	$this->name     = 'checkbox';
	$this->label    = __( 'Checkbox', 'acf' );
	$this->category = 'choice';
	$this->defaults = array(
		'layout'        => 'vertical',
		'choices'       => array(),
		'default_value' => '',
		'allow_custom'  => 0,
		'save_custom'   => 0,
		'toggle'        => 0,
		'return_format' => 'value',
	);

}