WPSEO_Abstract_Post_Filter::enqueue_explanation_assets()publicYoast 1.0

Enqueues the necessary assets to display a filter explanation.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Abstract_Post_Filter = new WPSEO_Abstract_Post_Filter();
$WPSEO_Abstract_Post_Filter->enqueue_explanation_assets();

Код WPSEO_Abstract_Post_Filter::enqueue_explanation_assets() Yoast 23.6

public function enqueue_explanation_assets() {
	$asset_manager = new WPSEO_Admin_Asset_Manager();
	$asset_manager->enqueue_script( 'filter-explanation' );
	$asset_manager->enqueue_style( 'filter-explanation' );
	$asset_manager->localize_script(
		'filter-explanation',
		'yoastFilterExplanation',
		[ 'text' => $this->get_explanation() ]
	);
}