A WordPress-centric search engine for devs and theme authors



auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype} ›

Since5.0.0
Deprecatedn/a
apply_filters( "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $allowed, $meta_key, $object_id, $user_id, $cap, $caps )
Parameters: (6)
  • (bool) $allowed Whether the user can add the object meta. Default false.
    Required: Yes
  • (string) $meta_key The meta key.
    Required: Yes
  • (int) $object_id Object ID.
    Required: Yes
  • (int) $user_id User ID.
    Required: Yes
  • (string) $cap Capability name.
    Required: Yes
  • (string[]) $caps Array of the user's capabilities.
    Required: Yes
Defined at:
Codex:

Filters whether the user is allowed to edit a specific meta key of a specific object type and subtype.

The dynamic portions of the hook name, $object_type, $meta_key, and $object_subtype, refer to the metadata object type (comment, post, term or user), the meta key value, and the object subtype respectively.





Source

$allowed = apply_filters( "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $allowed, $meta_key, $object_id, $user_id, $cap, $caps );