Yoast\WP\SEO\Abilities\User_Interface\Abilities
Abstract_Archive_And_Special_Page_SEO_Settings_Ability::can_manage_seo
Checks whether the current user can manage Yoast SEO.
Gates the ability behind the same capability that gates the settings page where the templates are set.
Метод класса: Abstract_Archive_And_Special_Page_SEO_Settings_Ability{}
Хуков нет.
Возвращает
bool. Whether the current user can manage Yoast SEO.
Использование
$Abstract_Archive_And_Special_Page_SEO_Settings_Ability = new Abstract_Archive_And_Special_Page_SEO_Settings_Ability(); $Abstract_Archive_And_Special_Page_SEO_Settings_Ability->can_manage_seo(): bool;
Код Abstract_Archive_And_Special_Page_SEO_Settings_Ability::can_manage_seo() Abstract Archive And Special Page SEO Settings Ability::can manage seo Yoast 28.9
public function can_manage_seo(): bool {
return $this->capability_helper->current_user_can( 'wpseo_manage_options' );
}