Removes a capability from role.
Parameters
$role
stringrequired- Role name.
$cap
stringrequired- Capability name.
Source
public function remove_cap( $role, $cap ) {
if ( ! isset( $this->roles[ $role ] ) ) {
return;
}
unset( $this->roles[ $role ]['capabilities'][ $cap ] );
if ( $this->use_db ) {
update_option( $this->role_key, $this->roles );
}
}
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |
From Codex