acf_field_oembed::initialize() public ACF 5.0.0
__construct
This function will setup the field type data
{} Это метод класса: acf_field_oembed{}
Хуков нет.
Возвращает
n/a.
Использование
$acf_field_oembed = new acf_field_oembed(); $acf_field_oembed->initialize();
- (n/a) (обязательный)
Список изменений
С версии 5.0.0 | Введена. |
Код acf_field_oembed::initialize() acf field oembed::initialize ACF 5.9.1
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'));
}