Yoast_Dashboard_Widget::is_dashboard_screen
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 Dashboard Widget::is dashboard screen Yoast 26.7
private function is_dashboard_screen() {
$current_screen = get_current_screen();
return ( $current_screen instanceof WP_Screen && $current_screen->id === 'dashboard' );
}