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. @type string $0 Requested capability. @type int $1 Concerned user ID. @type mixed ...$2 Optional second and further parameters, typically object ID.}
$0string
Requested capability.
$1int
Concerned user ID.
...$2mixed
Optional second and further parameters, typically object ID.
809* @type string$0 Requested capability.810* @type int$1 Concerned user ID.811* @type mixed...$2 Optional second and further parameters, typically objectID.812*}813* @param WP_User$user The user object.814*/815$capabilities=apply_filters('user_has_cap',$this->allcaps,$caps,$args,$this);816817// Everyone is allowed to exist.818$capabilities['exist']=true;819820// Nobody is allowed to do things they are not allowed to do.821unset($capabilities['do_not_allow']);
History
Introduced in 2.0.0. Unchanged from 6.7.7 through 7.1.0.