Allow remove_cap() to unset a negative capability. Props johnjamesjacoby. fixes #21786
git-svn-id: https://develop.svn.wordpress.org/trunk@21940 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2c8fd31155
commit
ad535df32e
@ -868,7 +868,7 @@ class WP_User {
|
||||
* @param string $cap Capability name.
|
||||
*/
|
||||
function remove_cap( $cap ) {
|
||||
if ( empty( $this->caps[$cap] ) )
|
||||
if ( ! isset( $this->caps[$cap] ) )
|
||||
return;
|
||||
unset( $this->caps[$cap] );
|
||||
update_user_meta( $this->ID, $this->cap_key, $this->caps );
|
||||
|
Loading…
Reference in New Issue
Block a user