WPDev.one

get_role()

get_role( mixed $role )

Retrieves role object.

Parameters 1 required

Name / Type Description
$role
string

Role name.

Required

Return Value

((WP_Role)
| null) WP_Role object if found, null if the role does not exist.

Function Information

Since Version
2.0.0
Source File
wp-includes/capabilities.php
Advertisement