Свойство | Тип | Описание | |
---|---|---|---|
$allCapabilities | array | The list of all capabilities | |
$capabilities | array | This is the capabilities list without WordPress capabilties | |
$defaultCapabilities | array | The standard WordPress capabilities list | |
$roleCapabilities | array | All capabilities in all roles | |
$userCapabilities | array | The list of capabilities added to users |
Метод | Описание | |
---|---|---|
add_cap ( WPDKUserCapability $cap, array $roles = [], array $users = [] ) | Add a capability to roles and/or users | |
allCapabilities ( ) : array | Return a key value pairs array with all registered capabilities. | |
capabilityExists ( string $cap ) : boolean | Return TRUE if a capability exists | |
defaultCapabilities ( ) : array | Return a key value pairs array with unique id key of capability and the description as value. | |
delete ( string | array $id ) | Delete capabilities | |
delete_extended_data ( string | WPDKUserCapability $capability ) | Delete the capabilties extended data | |
getInstance ( ) : WPDKUserCapabilities | Return a singleton instance of WPDKUserCapabilities class | |
get_extended_data ( string | WPDKUserCapability $capability ) : boolean | Return the capabilties extended data or FALSE if not found. | |
init ( ) : WPDKUserCapabilities | Return a singleton instance of WPDKUserCapabilities class | |
roleCapabilities ( ) : array | Gets an array of capabilities according to each user role. Each role will return its caps, which are then added to the overall $capabilities array. | |
update_extended_data ( WPDKUserCapability $capability ) | Updated the capabilties extended data | |
userCapabilities ( ) : array | Return the capability added to user. | |
usersCapability ( ) : array | Return a key value pairs array. For each user the list of its capabilties. | |
usersWithCaps ( string | array $caps ) | Return a list of users id with any caps |
Метод | Описание | |
---|---|---|
__construct ( ) : WPDKUserCapabilities | Create an instance of WPDKUserCapabilities class | |
oldLevels ( ) : array | Return a key value pairs array with unique id key of capability and the description as value. |
public allCapabilities ( ) : array | ||
Результат | array |
public capabilityExists ( string $cap ) : boolean | ||
$cap | string | Capability ID |
Результат | boolean |
public static defaultCapabilities ( ) : array | ||
Результат | array | $defaults All the default WordPress capabilities. |
public delete_extended_data ( string | WPDKUserCapability $capability ) | ||
$capability | string | WPDKUserCapability | Any cap id or WPDKUserCapability istance |
public static getInstance ( ) : WPDKUserCapabilities | ||
Результат | WPDKUserCapabilities |
public get_extended_data ( string | WPDKUserCapability $capability ) : boolean | ||
$capability | string | WPDKUserCapability | Any cap id or WPDKUserCapability istance |
Результат | boolean |
public static init ( ) : WPDKUserCapabilities | ||
Результат | WPDKUserCapabilities |
public roleCapabilities ( ) : array | ||
Результат | array | $capabilities All the capabilities of all the user roles. |
public update_extended_data ( WPDKUserCapability $capability ) | ||
$capability | WPDKUserCapability | An instance of WPDKUserCapability class |
public userCapabilities ( ) : array | ||
Результат | array |
public usersCapability ( ) : array | ||
Результат | array |
public usersWithCaps ( string | array $caps ) | ||
$caps | string | array | Any single or array of caps |
public array $allCapabilities | ||
Результат | array |
public array $capabilities | ||
Результат | array |
public array $defaultCapabilities | ||
Результат | array |
public array $roleCapabilities | ||
Результат | array |
public array $userCapabilities | ||
Результат | array |