Docs: Correct description for `WP_User::get_role_caps()`.

Props thomaswm.
Fixes #43410.
Built from https://develop.svn.wordpress.org/trunk@42735


git-svn-id: http://core.svn.wordpress.org/trunk@42565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-02-25 15:39:30 +00:00
parent b6229650e0
commit 35d5163d66
2 changed files with 6 additions and 6 deletions

View File

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

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42734';
$wp_version = '5.0-alpha-42735';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.