Yoast\WP\SEO\Routes
Wincher_Route::can_use_wincher()
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() Wincher Route::can use wincher Yoast 24.9
public function can_use_wincher() { return \current_user_can( 'publish_posts' ) || \current_user_can( 'publish_pages' ); }