Add an additional available param (the `WP_User` instance) to the `user_has_cap` filter.
Props Viper007Bond. Fixes #24490. Built from https://develop.svn.wordpress.org/trunk@25329 git-svn-id: http://core.svn.wordpress.org/trunk@25291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2f267f6a2a
commit
cb70e277af
|
@ -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