From 00b59e627d01688173b920c2f7f955c2887e0829 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 25 Feb 2018 15:38:13 +0000 Subject: [PATCH] Docs: Correct description for `WP_User::get_role_caps()`. Props thomaswm. Fixes #43410. git-svn-id: https://develop.svn.wordpress.org/trunk@42735 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-user.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/class-wp-user.php b/src/wp-includes/class-wp-user.php index f67780f1f4..6b03593871 100644 --- a/src/wp-includes/class-wp-user.php +++ b/src/wp-includes/class-wp-user.php @@ -481,9 +481,9 @@ class WP_User { * Retrieve all of the role capabilities and merge with individual capabilities. * * All of the capabilities of the roles the user belongs to are merged with - * the users individual roles. This also means that the user can be denied - * specific roles that their role might have, but the specific user isn't - * granted permission to. + * user's individual capabilities. This also means that the user can be denied + * specific capabilities that their role might have, but the user isn't granted + * permission to. * * @since 2.0.0 * @@ -499,12 +499,12 @@ class WP_User { $wp_roles = wp_roles(); - //Filter out caps that are not role names and assign to $this->roles + // Filter out caps that are not role names and assign to $this->roles. if ( is_array( $this->caps ) ) { $this->roles = array_filter( array_keys( $this->caps ), array( $wp_roles, 'is_role' ) ); } - //Build $allcaps from role caps, overlay user's $caps + // Build $allcaps from role caps, overlay user's $caps. $this->allcaps = array(); foreach ( (array) $this->roles as $role ) { $the_role = $wp_roles->get_role( $role );