Yoast\WP\SEO\Routes

Wincher_Route::can_use_wincher()publicYoast 1.0

Whether the current user is allowed to publish post/pages and thus use the Wincher integration.

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

Хуков нет.

Возвращает

true|false. Whether the current user is allowed to use Wincher.

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

$Wincher_Route = new Wincher_Route();
$Wincher_Route->can_use_wincher();

Код Wincher_Route::can_use_wincher() Yoast 19.11

public function can_use_wincher() {
	return \current_user_can( 'publish_posts' ) || \current_user_can( 'publish_pages' );
}