mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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 ] ) )
|
||||
|
||||
Reference in New Issue
Block a user