Yoast\WP\SEO\Abilities\User_Interface\Abilities
Update_Site_Representation_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 site representation is set.
Метод класса: Update_Site_Representation_Ability{}
Хуков нет.
Возвращает
bool. Whether the current user can manage Yoast SEO.
Использование
$Update_Site_Representation_Ability = new Update_Site_Representation_Ability(); $Update_Site_Representation_Ability->can_manage_seo(): bool;
Код Update_Site_Representation_Ability::can_manage_seo() Update Site Representation Ability::can manage seo Yoast 28.8
public function can_manage_seo(): bool {
return $this->capability_helper->current_user_can( 'wpseo_manage_options' );
}