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



role_has_cap ›

Since2.0.0
已弃用n/a
apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name )
参数: (3)
  • (bool[]) $capabilities Associative array of capabilities for the role.
    Required: Yes
  • (string) $cap Capability name.
    Required: Yes
  • (string) $name Role name.
    Required: Yes
定义在:
文档:

Filters which capabilities a role has.





源码

$capabilities = apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name );