Add an additional available param (the WP_User
instance) to the user_has_cap
filter.
Props Viper007Bond. Fixes #24490. git-svn-id: https://develop.svn.wordpress.org/trunk@25329 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4fccea305f
commit
c71a0422c0
@ -936,7 +936,7 @@ class WP_User {
|
||||
}
|
||||
|
||||
// Must have ALL requested caps
|
||||
$capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args );
|
||||
$capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this );
|
||||
$capabilities['exist'] = true; // Everyone is allowed to exist
|
||||
foreach ( (array) $caps as $cap ) {
|
||||
if ( empty( $capabilities[ $cap ] ) )
|
||||
|
Loading…
Reference in New Issue
Block a user