From cb70e277af2a35243cc51aa5df897e0493b0be5a Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 10 Sep 2013 22:23:10 +0000 Subject: [PATCH] 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 --- wp-includes/capabilities.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 1884cdc785..e67618022e 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -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 ] ) )