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:
Scott Taylor 2013-09-10 22:22:34 +00:00
parent 4fccea305f
commit c71a0422c0

View File

@ -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 ] ) )