Wincher_Dashboard_Widget::show_widget()privateYoast 1.0

Returns true when the Wincher dashboard widget should be shown.

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

Хуков нет.

Возвращает

true|false.

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

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

Код Wincher_Dashboard_Widget::show_widget() Yoast 24.3

private function show_widget() {
	$analysis_seo      = new WPSEO_Metabox_Analysis_SEO();
	$user_can_edit     = $analysis_seo->is_enabled() && current_user_can( 'edit_posts' );
	$is_wincher_active = YoastSEO()->helpers->wincher->is_active();

	return $user_can_edit && $is_wincher_active;
}