示例#1
0
/**
 * Returns the name/label for a specific role.
 *
 * @since  1.0.0
 * @access public
 * @param  string  $role
 * @return string
 */
function mb_get_role_name($role = '')
{
    $role = mb_get_role($role);
    $roles = mb_get_dynamic_roles();
    $name = isset($roles[$role]) ? mb_get_role_object($role)->labels->singular_name : '';
    return apply_filters('mb_get_role_name', $name, $role);
}
示例#2
0
function mb_get_role_description($role = '')
{
    $role = mb_get_role($role);
    $desc = $role ? mb_get_role_object($role)->description : '';
    return apply_filters('mb_get_role_description', $desc, $role);
}