mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Docs: Use third-person singular verbs for method descriptions in wp-includes/class-wp-roles.php, per the documentation standards.
See #55646. git-svn-id: https://develop.svn.wordpress.org/trunk@53436 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1020,12 +1020,13 @@ function get_role( $role ) {
|
||||
* @param string $display_name Display name for role.
|
||||
* @param bool[] $capabilities List of capabilities keyed by the capability name,
|
||||
* e.g. array( 'edit_posts' => true, 'delete_posts' => false ).
|
||||
* @return WP_Role|null WP_Role object if role is added, null if already exists.
|
||||
* @return WP_Role|void WP_Role object, if the role is added.
|
||||
*/
|
||||
function add_role( $role, $display_name, $capabilities = array() ) {
|
||||
if ( empty( $role ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
return wp_roles()->add_role( $role, $display_name, $capabilities );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user