wpseek.com
WordPress开发者和主题制作者的搜索引擎



user_has_cap › WordPress过滤钩子

Since3.7.0
已弃用n/a
› apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this )
参数: (4)
  • () allcaps Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability.
    Required: Yes
  • () caps Required primitive capabilities for the requested capability.
    Required: Yes
  • () 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
  • () user The user object.
    Required: Yes
定义在:
文档:

Dynamically filter a user's capabilities.





源码

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