Yoast_Dashboard_Widget::enqueue_dashboard_assets()publicYoast 1.0

Enqueues assets for the dashboard if the current page is the dashboard.

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

Хуков нет.

Возвращает

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

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

$Yoast_Dashboard_Widget = new Yoast_Dashboard_Widget();
$Yoast_Dashboard_Widget->enqueue_dashboard_assets();

Код Yoast_Dashboard_Widget::enqueue_dashboard_assets() Yoast 22.4

public function enqueue_dashboard_assets() {
	if ( ! $this->is_dashboard_screen() ) {
		return;
	}

	$this->asset_manager->localize_script( 'dashboard-widget', 'wpseoDashboardWidgetL10n', $this->localize_dashboard_script() );
	$this->asset_manager->enqueue_script( 'dashboard-widget' );
	$this->asset_manager->enqueue_style( 'wp-dashboard' );
	$this->asset_manager->enqueue_style( 'monorepo' );
}