Yoast_Dashboard_Widget::is_dashboard_screen()privateYoast 1.0

Checks if the current screen is the dashboard screen.

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

Хуков нет.

Возвращает

true|false. Whether or not this is the dashboard screen.

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

// private - только в коде основоного (родительского) класса
$result = $this->is_dashboard_screen();

Код Yoast_Dashboard_Widget::is_dashboard_screen() Yoast 22.4

private function is_dashboard_screen() {
	$current_screen = get_current_screen();

	return ( $current_screen instanceof WP_Screen && $current_screen->id === 'dashboard' );
}