WPDK
1.5.0
WordPress Development Kit
|
Public Member Functions | |
__construct ($role, $display_name= '', $capabilities=array(), $description= '', $owner= '') | |
Construct. More... | |
update () | |
Update. More... | |
Data Fields | |
$displayName | |
Display name. More... | |
$description | |
Description. More... | |
$owner | |
Owner. More... | |
An extend WP_Role class for Role model.
The WPDKRole is a new model for WordPress role object.
Definition at line 1664 of file wpdk-user.php.
__construct | ( | $role, | |
$display_name = '' , |
|||
$capabilities = array() , |
|||
$description = '' , |
|||
$owner = '' |
|||
) |
Construct.
Create an instance of WPDKRoles class. If role already exists you get the role object, else you create (add) a new role. In this case you have to set display_name, description and capabilities.
string | $role | Role key |
string | $display_name | Optional. Role display name. This param is optional because you coul read an exists role |
array | $capabilities | Optional. List of any WPDKCapability or name of capability |
string | $description | Optional. The extended description of this role |
string | $owner | Optional. Owner of this role |
Definition at line 1710 of file wpdk-user.php.
update | ( | ) |
Update.
Update the extra role information
Definition at line 1757 of file wpdk-user.php.
string $description |
Description.
Extended description for this role. This extra information is stored in the special array into the wp_options default database table.
Definition at line 1683 of file wpdk-user.php.
string $displayName |
$string $owner |