Make WordPress Core


Ignore:
Timestamp:
05/23/2022 02:59:44 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Use third-person singular verbs for method descriptions in wp-includes/class-wp-roles.php, per the documentation standards.

See #55646.

File:
1 edited

Legend:

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

    r51518 r53436  
    7474
    7575    /**
    76      * Constructor
     76     * Constructor.
    7777     *
    7878     * @since 2.0.0
     
    9292
    9393    /**
    94      * Make private/protected methods readable for backward compatibility.
     94     * Makes private/protected methods readable for backward compatibility.
    9595     *
    9696     * @since 4.0.0
     
    108108
    109109    /**
    110      * Set up the object properties.
     110     * Sets up the object properties.
    111111     *
    112112     * The role key is set to the current prefix for the $wpdb object with
     
    124124
    125125    /**
    126      * Reinitialize the object
     126     * Reinitializes the object.
    127127     *
    128128     * Recreates the role objects. This is typically called only by switch_to_blog()
     
    139139
    140140    /**
    141      * Add role name with capabilities to list.
     141     * Adds a role name with capabilities to the list.
    142142     *
    143143     * Updates the list of roles, if the role doesn't already exist.
    144144     *
    145      * The capabilities are defined in the following format `array( 'read' => true );`
    146      * To explicitly deny a role a capability you set the value for that capability to false.
     145     * The capabilities are defined in the following format: `array( 'read' => true )`.
     146     * To explicitly deny the role a capability, set the value for that capability to false.
    147147     *
    148148     * @since 2.0.0
     
    150150     * @param string $role         Role name.
    151151     * @param string $display_name Role display name.
    152      * @param bool[] $capabilities List of capabilities keyed by the capability name,
    153      *                             e.g. array( 'edit_posts' => true, 'delete_posts' => false ).
    154      * @return WP_Role|void WP_Role object, if role is added.
     152     * @param bool[] $capabilities Optional. List of capabilities keyed by the capability name,
     153     *                             e.g. `array( 'edit_posts' => true, 'delete_posts' => false )`.
     154     *                             Default empty array.
     155     * @return WP_Role|void WP_Role object, if the role is added.
    155156     */
    156157    public function add_role( $role, $display_name, $capabilities = array() ) {
     
    172173
    173174    /**
    174      * Remove role by name.
     175     * Removes a role by name.
    175176     *
    176177     * @since 2.0.0
     
    197198
    198199    /**
    199      * Add capability to role.
     200     * Adds a capability to role.
    200201     *
    201202     * @since 2.0.0
     
    218219
    219220    /**
    220      * Remove capability from role.
     221     * Removes a capability from role.
    221222     *
    222223     * @since 2.0.0
     
    237238
    238239    /**
    239      * Retrieve role object by name.
     240     * Retrieves a role object by name.
    240241     *
    241242     * @since 2.0.0
     
    253254
    254255    /**
    255      * Retrieve list of role names.
     256     * Retrieves a list of role names.
    256257     *
    257258     * @since 2.0.0
     
    264265
    265266    /**
    266      * Whether role name is currently in the list of available roles.
     267     * Determines whether a role name is currently in the list of available roles.
    267268     *
    268269     * @since 2.0.0
     
    293294
    294295        /**
    295          * After the roles have been initialized, allow plugins to add their own roles.
     296         * Fires after the roles have been initialized, allowing plugins to add their own roles.
    296297         *
    297298         * @since 4.7.0
Note: See TracChangeset for help on using the changeset viewer.