PHP Class WPDKUserRole

## Overview The WPDKUserRole is a new model for WordPress role object.
Since: 1.6.0
Author: =undo= ([email protected])
Inheritance: extends WP_Role
Afficher le fichier Open project: wpxtreme/wpdk

Méthodes publiques

Свойство Type Description
$description string Extended description for this role. This extra information is stored in the special array into the wp_options default database table.
$displayName string The display name of role
$owner Who create this role

Méthodes publiques

Méthode Description
__construct ( string $role, string $display_name = '', array $capabilities = [], string $description = '', string $owner = '' ) : WPDKUserRole Create an instance of WPDKUserRoles class.
update ( ) : boolean Update the extra role information

Method Details

__construct() public méthode

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.
public __construct ( string $role, string $display_name = '', array $capabilities = [], string $description = '', string $owner = '' ) : WPDKUserRole
$role string Role key
$display_name string Optional. Role display name. This param is optional because you coul read an exists role
$capabilities array Optional. List of any WPDKCapability or name of capability
$description string Optional. The extended description of this role
$owner string Optional. Owner of this role
Résultat WPDKUserRole

update() public méthode

Update the extra role information
public update ( ) : boolean
Résultat boolean

Property Details

$description public_oe property

Extended description for this role. This extra information is stored in the special array into the wp_options default database table.
public string $description
Résultat string

$displayName public_oe property

The display name of role
public string $displayName
Résultat string

$owner public_oe property

Who create this role
public $owner