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