From a1019e97b0654209f2f8c924b3047e8c2a99d153 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 7 Feb 2016 01:26:17 +0000 Subject: [PATCH] Docs: Add a note to the DocBlock for `current_user_can()` to explain that it will always return true for super admins, unless specifically denied. Props finnj. Fixes #35551. git-svn-id: https://develop.svn.wordpress.org/trunk@36492 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/capabilities.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/capabilities.php b/src/wp-includes/capabilities.php index e6526daa82..9ed3447e6c 100644 --- a/src/wp-includes/capabilities.php +++ b/src/wp-includes/capabilities.php @@ -408,6 +408,8 @@ function map_meta_cap( $cap, $user_id ) { * While checking against particular roles in place of a capability is supported * in part, this practice is discouraged as it may produce unreliable results. * + * Note: Will always return true if the current user is a super admin, unless specifically denied. + * * @since 2.0.0 * * @see WP_User::has_cap()