WPDev.one
Core Class

WP_Role

class WP_Role // Constructor: function Object() { [native code] }

Core class used to extend the user roles API.

Methods 4 methods

Method / Return Description
__construct()
void

Constructor - Set up object properties.

Parameters: $role: mixed, $capabilities: mixed
add_cap()
void

Assign role a capability.

Parameters: $cap: mixed, $grant: mixed
remove_cap()
void

Removes a capability from a role.

Parameters: $cap: mixed
has_cap()
bool

Determines whether the role has the given capability.

Parameters: $cap: mixed

Properties

Property / Type Description
$name
mixed
public
No description available.
$capabilities
mixed
public
No description available.

Class Information

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