Свойство | Type | Description | |
---|---|---|---|
$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 |
Méthode | Description | |
---|---|---|
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 |
Méthode | Description | |
---|---|---|
__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 | ||
Résultat | array |
public capabilityExists ( string $cap ) : boolean | ||
$cap | string | Capability ID |
Résultat | boolean |
public static defaultCapabilities ( ) : array | ||
Résultat | 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 | ||
Résultat | WPDKUserCapabilities |
public get_extended_data ( string | WPDKUserCapability $capability ) : boolean | ||
$capability | string | WPDKUserCapability | Any cap id or WPDKUserCapability istance |
Résultat | boolean |
public static init ( ) : WPDKUserCapabilities | ||
Résultat | WPDKUserCapabilities |
public roleCapabilities ( ) : array | ||
Résultat | 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 | ||
Résultat | array |
public usersCapability ( ) : array | ||
Résultat | array |
public usersWithCaps ( string | array $caps ) | ||
$caps | string | array | Any single or array of caps |
public array $allCapabilities | ||
Résultat | array |
public array $capabilities | ||
Résultat | array |
public array $defaultCapabilities | ||
Résultat | array |
public array $roleCapabilities | ||
Résultat | array |
public array $userCapabilities | ||
Résultat | array |