On this page
apply_filters( 'role_has_cap', bool[] $capabilities, string $cap, string $name )
Filters which capabilities a role has.
Parameters
$capabilitiesbool[]-
Array of key/value pairs where keys represent a capability name and boolean values represent whether the role has that capability.
$capstring-
Capability name.
$namestring-
Role name.
Source
File: wp-includes/class-wp-role.php. View all references
$capabilities = apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name );
Related
Used By
| Used By | Description |
|---|---|
| WP_Role::has_cap() wp-includes/class-wp-role.php | Determines whether the role has the given capability. |
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/role_has_cap