Yoast\WP\SEO\Routes

SEMrush_Route::can_use_semrush()publicYoast 1.0

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() Yoast 22.4

public function can_use_semrush() {
	return \current_user_can( 'edit_posts' ) || \current_user_can( 'edit_pages' );
}