WPSEO_Admin_Bar_Menu::can_manage_options()
Checks whether the current user can manage options in the current context.
Метод класса: WPSEO_Admin_Bar_Menu{}
Хуков нет.
Возвращает
true|false
. True if capabilities are sufficient, false otherwise.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->can_manage_options();
Код WPSEO_Admin_Bar_Menu::can_manage_options() WPSEO Admin Bar Menu::can manage options Yoast 21.1
protected function can_manage_options() { return is_network_admin() && current_user_can( 'wpseo_manage_network_options' ) || ! is_network_admin() && WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ); }