acf_field_message::initialize │ public │ ACF 5.0.0

This function will setup the field type data

Method of the class: acf_field_message{}

No Hooks.

Returns

n/a.

Usage

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

Changelog

Since 5.0.0 Introduced.

acf_field_message::initialize() code ACF 6.8.8

function initialize() {

	// vars
	$this->name          = 'message';
	$this->label         = __( 'Message', 'acf' );
	$this->category      = 'layout';
	$this->description   = __( 'Used to display a message to editors alongside other fields. Useful for providing additional context or instructions around your fields.', 'acf' );
	$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-message.png';
	$this->supports      = array(
		'required' => false,
		'bindings' => false,
	);
	$this->defaults      = array(
		'message'   => '',
		'esc_html'  => 0,
		'new_lines' => 'wpautop',
	);
}