PHP Класс WPDKUserRole

## Overview The WPDKUserRole is a new model for WordPress role object.
С версии: 1.6.0
Автор: =undo= ([email protected])
Наследование: extends WP_Role
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный Метод

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
Результат WPDKUserRole

update() публичный Метод

Update the extra role information
public update ( ) : boolean
Результат boolean

Описание свойств

$description публичное свойство

Extended description for this role. This extra information is stored in the special array into the wp_options default database table.
public string $description
Результат string

$displayName публичное свойство

The display name of role
public string $displayName
Результат string

$owner публичное свойство

Who create this role
public $owner