Outil de recherche WordPress pour les développeurs et auteurs de thèmes

get_{$meta_type}_metadata ›

apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single )
Paramètres: (4)
  • (null|array|string) $value The value get_metadata() should return - a single metadata value, or an array of values.
    Requis: Oui
  • (int) $object_id Object ID.
    Requis: Oui
  • (string) $meta_key Meta key.
    Requis: Oui
  • (bool) $single Whether to return only the first value of the specified $meta_key.
    Requis: Oui
Défini(e) dans:

Filters whether to retrieve metadata of a specific type.

The dynamic portion of the hook, $meta_type, refers to the meta object type (comment, post, term, or user). Returning a non-null value will effectively short-circuit the function.


$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single );