Yoast\WP\SEO\Routes

SEMrush_Route::can_use_semrush │ public │ Yoast 1.0

Whether or not the current user is allowed to edit post/pages and thus use the SEMrush integration.

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

Хуков нет.

Возвращает

bool. 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 28.9

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