Yoast\WP\SEO\Routes
SEMrush_Route::can_use_semrush()
Whether or not the current user is allowed to edit post/pages and thus use the SEMrush integration.
Метод класса: SEMrush_Route{}
Хуков нет.
Возвращает
true|false
. Whether or not the current user is allowed to use SEMrush.
Использование
$SEMrush_Route = new SEMrush_Route(); $SEMrush_Route->can_use_semrush();
Код SEMrush_Route::can_use_semrush() SEMrush Route::can use semrush Yoast 24.9
public function can_use_semrush() { return \current_user_can( 'edit_posts' ) || \current_user_can( 'edit_pages' ); }