Description
Dynamically filter a user's capabilities. }
Occurrences
Filename | Line Number |
---|---|
wp-includes/class-wp-user.php | 813 |
Parameters
Type | Name | Description |
---|---|---|
bool[] | $allcaps | Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability. |
string[] | $caps | Required primitive capabilities for the requested capability. |
array | $args | { Arguments that accompany the requested capability check. |
WP_User | $user | The user object. |
PHP Doc
/**
* Dynamically filter a user's capabilities.
*
* @since 2.0.0
* @since 3.7.0 Added the `$user` parameter.
*
* @param bool[] $allcaps Array of key/value pairs where keys represent a capability name
* and boolean values represent whether the user has that capability.
* @param string[] $caps Required primitive capabilities for the requested capability.
* @param array $args {
* Arguments that accompany the requested capability check.
*
* @type string $0 Requested capability.
* @type int $1 Concerned user ID.
* @type mixed ...$2 Optional second and further parameters, typically object ID.
* }
* @param WP_User $user The user object.
*/