Used By
Used By | Description |
---|---|
wp-includes/class-wp-user.php: WP_User::has_cap() | Returns whether the user has the specified capability. |
Dynamically filter a user’s capabilities.
(bool[]) Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability.
(string[]) Required primitive capabilities for the requested capability.
(array) Arguments that accompany the requested capability check.
(int) Concerned user ID.
(mixed) Optional second and further parameters, typically object ID.
(WP_User) The user object.
Version | Description |
---|---|
3.7.0 | Added the $user parameter. |
2.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/user_has_cap