PHP 클래스 WPDKUserRole

## Overview The WPDKUserRole is a new model for WordPress role object.
부터: 1.6.0
저자: =undo= ([email protected])
상속: extends WP_Role
파일 보기 프로젝트 열기: wpxtreme/wpdk

공개 프로퍼티들

프로퍼티 타입 설명
$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