WPSEO_Capability_Manager_VIP::remove()
Removes the registered capabilities from the system
Метод класса: WPSEO_Capability_Manager_VIP{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WPSEO_Capability_Manager_VIP = new WPSEO_Capability_Manager_VIP(); $WPSEO_Capability_Manager_VIP->remove();
Код WPSEO_Capability_Manager_VIP::remove() WPSEO Capability Manager VIP::remove Yoast 24.0
public function remove() { // Remove from any role it has been added to. $roles = wp_roles()->get_names(); $roles = array_keys( $roles ); $role_capabilities = []; foreach ( array_keys( $this->capabilities ) as $capability ) { // Allow filtering of roles. $role_capabilities = $this->get_role_capabilities( $role_capabilities, $capability, $roles ); } foreach ( $role_capabilities as $role => $capabilities ) { wpcom_vip_remove_role_caps( $role, $capabilities ); } }