Dynamically filter a user’s capabilities.
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.
0
stringRequested capability.1
intConcerned user ID....$2
mixedOptional second and further parameters, typically object ID.
$user
WP_User- The user object.
Source
$capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this );
User Contributed Notes