filter_default_metadata


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

Parameters:
  • (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.
Returns:
  • (mixed) An array of default values if `$single` is false. The default value of the meta field if `$single` is true.
Defined at:

Description

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

Related Functions

filter_default_option, delete_metadata, register_default_headers, unregister_default_headers, get_metadata

Top Google Results

User discussions

wpseek mobile