If you want to specifically deny a capability from a user (not a role), you need to use the add_cap()
method and specify that the $grant
parameter is false.
$user = new WP_User( 'Y' );
$user->add_cap( 'edit_plugins', false );
If you want to specifically deny a capability from a user (not a role), you need to use the add_cap()
method and specify that the $grant
parameter is false.
$user = new WP_User( 'Y' );
$user->add_cap( 'edit_plugins', false );