filter_default_metadata ( $value, $object_id, $meta_key, $single, $meta_type )

  • (mixed) value Current value passed to filter.
  • (int) object_id ID of the object metadata is for.
  • (string) meta_key Metadata key.
  • (bool) single If true, return only the first value of the specified `$meta_key`. This parameter has no effect if `$meta_key` is not specified.
  • (string) meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.
  • (mixed) An array of default values if `$single` is false. The default value of the meta field if `$single` is true.
Defined at:


Filters into default_{$object_type}_metadata and adds in default value.

Related Functions

filter_default_option, register_default_headers, delete_metadata, unregister_default_headers, get_metadata

Top Google Results

User discussions

wpseek mobile