apply_filters( 'user_has_cap', bool[] $allcaps , string[] $caps , array $args , WP_User $user )
Dynamically filter a user’s capabilities.
Description Description
Parameters Parameters
- $allcaps
-
(bool[]) Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability.
- $caps
-
(string[]) Required primitive capabilities for the requested capability.
- $args
-
(array) Arguments that accompany the requested capability check.
- (string) Requested capability.
- '1'
(int) Concerned user ID. - '...$2'
(mixed) Optional second and further parameters, typically object ID.
- $user
-
(WP_User) The user object.
Source Source
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Added the $user parameter. |
2.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Expand full source codeCollapse full source code