Clarkson_Role
in package
Object oriented wrapper for WP_Role objects.
Table of Contents
- __construct() : mixed
- Clarkson_Role constructor.
- get() : Clarkson_Role|null
- Get Clarkson Role object by role name.
- get_by_name() : Clarkson_Role|null
- Get Clarkson Role object by role name.
- get_many() : array<string|int, Clarkson_Role>
- Get all available Clarkson Role objects
- get_role() : WP_Role
- Get the WordPress WP_Role object.
Methods
__construct()
Clarkson_Role constructor.
public
__construct(WP_Role $role) : mixed
Parameters
- $role : WP_Role
Return values
mixed —get()
Get Clarkson Role object by role name.
public
static get(string $name) : Clarkson_Role|null
Parameters
- $name : string
-
Role name.
Return values
Clarkson_Role|null —get_by_name()
Get Clarkson Role object by role name.
public
static get_by_name(string $name) : Clarkson_Role|null
Parameters
- $name : string
-
Role name.
Return values
Clarkson_Role|null —get_many()
Get all available Clarkson Role objects
public
static get_many() : array<string|int, Clarkson_Role>
Return values
array<string|int, Clarkson_Role> —get_role()
Get the WordPress WP_Role object.
public
get_role() : WP_Role