Make WordPress Core

Changeset 42735


Ignore:
Timestamp:
02/25/2018 03:38:13 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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

Props thomaswm.
Fixes #43410.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-user.php

    r42343 r42735  
    482482     *
    483483     * All of the capabilities of the roles the user belongs to are merged with
    484      * the users individual roles. This also means that the user can be denied
    485      * specific roles that their role might have, but the specific user isn't
    486      * granted permission to.
     484     * user's individual capabilities. This also means that the user can be denied
     485     * specific capabilities that their role might have, but the user isn't granted
     486     * permission to.
    487487     *
    488488     * @since 2.0.0
     
    500500        $wp_roles = wp_roles();
    501501
    502         //Filter out caps that are not role names and assign to $this->roles
     502        // Filter out caps that are not role names and assign to $this->roles.
    503503        if ( is_array( $this->caps ) ) {
    504504            $this->roles = array_filter( array_keys( $this->caps ), array( $wp_roles, 'is_role' ) );
    505505        }
    506506
    507         //Build $allcaps from role caps, overlay user's $caps
     507        // Build $allcaps from role caps, overlay user's $caps.
    508508        $this->allcaps = array();
    509509        foreach ( (array) $this->roles as $role ) {
Note: See TracChangeset for help on using the changeset viewer.