Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren

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

apply_filters( "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $allowed, $meta_key, $object_id, $user_id, $cap, $caps )
Parameter: (6)
  • (bool) $allowed Whether the user can add the object meta. Default false.
    Erforderlich: Ja
  • (string) $meta_key The meta key.
    Erforderlich: Ja
  • (int) $object_id Object ID.
    Erforderlich: Ja
  • (int) $user_id User ID.
    Erforderlich: Ja
  • (string) $cap Capability name.
    Erforderlich: Ja
  • (string[]) $caps Array of the user's capabilities.
    Erforderlich: Ja
Definiert in:

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.


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