acf_field_link::initializepublicACF 5.0.0

This function will setup the field type data

Method of the class: acf_field_link{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Changelog

Since 5.0.0 Introduced.

acf_field_link::initialize() code ACF 6.8.8

function initialize() {

	// vars
	$this->name          = 'link';
	$this->label         = __( 'Link', 'acf' );
	$this->category      = 'relational';
	$this->description   = __( 'Allows you to specify a link and its properties such as title and target using the WordPress native link picker.', 'acf' );
	$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-link.png';
	$this->doc_url       = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/link/', 'docs', 'field-type-selection' );
	$this->defaults      = array(
		'return_format' => 'array',
	);
}