acf_field_oembed::initialize()publicACF 5.0.0

__construct

This function will setup the field type data

Метод класса: acf_field_oembed{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

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

Список изменений

С версии 5.0.0 Введена.

Код acf_field_oembed::initialize() ACF 6.0.4

function initialize() {

	// vars
	$this->name     = 'oembed';
	$this->label    = __( 'oEmbed', 'acf' );
	$this->category = 'content';
	$this->defaults = array(
		'width'  => '',
		'height' => '',
	);
	$this->width    = 640;
	$this->height   = 390;

	// extra
	add_action( 'wp_ajax_acf/fields/oembed/search', array( $this, 'ajax_query' ) );
	add_action( 'wp_ajax_nopriv_acf/fields/oembed/search', array( $this, 'ajax_query' ) );

}