A WordPress-centric search engine for devs and theme authors



user_has_cap ›

Since3.7.0
Deprecatedn/a
apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this )
Parameters: (4)
  • (bool[]) $allcaps Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability.
    Required: Yes
  • (string[]) $caps Required primitive capabilities for the requested capability.
    Required: Yes
  • (array) $args { 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. }
    Required: Yes
  • (WP_User) $user The user object.
    Required: Yes
Defined at:
Codex:

Dynamically filter a user's capabilities.





Source

$capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this );