WPDK  1.5.0
WordPress Development Kit
 All Data Structures Files Functions Variables Pages
WPDKRole Class Reference
Inheritance diagram for WPDKRole:

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...
 

Detailed Description

An extend WP_Role class for Role model.

Overview

The WPDKRole is a new model for WordPress role object.

Author
=undo= info@.nosp@m.wpxt.nosp@m.re.me
Date
2013-02-26
Version
0.9.0

Definition at line 1664 of file wpdk-user.php.

Constructor & Destructor Documentation

__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.

Parameters
string$roleRole key
string$display_nameOptional. Role display name. This param is optional because you coul read an exists role
array$capabilitiesOptional. List of any WPDKCapability or name of capability
string$descriptionOptional. The extended description of this role
string$ownerOptional. Owner of this role
Returns
WPDKRole

Definition at line 1710 of file wpdk-user.php.

Member Function Documentation

update ( )

Update.

Update the extra role information

Returns
bool

Definition at line 1757 of file wpdk-user.php.

Field Documentation

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

Display name.

The display name of role

Definition at line 1673 of file wpdk-user.php.

$string $owner

Owner.

Who create this role

Definition at line 1692 of file wpdk-user.php.


The documentation for this class was generated from the following file: