A WordPress-centric search engine for devs and theme authors



get_{$meta_type}_metadata ›

Since3.1.0
Deprecatedn/a
apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single )
Parameters: (4)
  • (null|array|string) $value The value get_metadata() should return - a single metadata value, or an array of values.
    Required: Yes
  • (int) $object_id Object ID.
    Required: Yes
  • (string) $meta_key Meta key.
    Required: Yes
  • (bool) $single Whether to return only the first value of the specified $meta_key.
    Required: Yes
Defined at:
Codex:

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, or user). Returning a non-null value will effectively short-circuit the function.





Source

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