Allow remove_cap() to unset a negative capability. Props johnjamesjacoby. fixes #21786
git-svn-id: http://core.svn.wordpress.org/trunk@21940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
df21fa1cc6
commit
ba84c90e1b
|
@ -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