Dynamically filter a user’s capabilities.
Parameters
$allcapsbool[]- Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability.
$capsstring[]- Required primitive capabilities for the requested capability.
$argsarray- Arguments that accompany the requested capability check.
0stringRequested capability.1intConcerned user ID....$2mixedOptional second and further parameters, typically object ID.
$userWP_User- The user object.
Source
$capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this );
User Contributed Notes