WordPress at Your Fingertips
filter is not described

default_(meta_type)_metadata filter-hook . WP 5.5.0

Filters the default metadata value for a specified meta key and object.

The dynamic portion of the hook, $meta_type, refers to the meta object type (post, comment, term, user, or any other type with an associated meta table).

Possible filter names include:

  • default_post_metadata
  • default_comment_metadata
  • default_term_metadata
  • default_user_metadata


add_filter( 'default_(meta_type)_metadata', 'filter_function_name_9474', 10, 5 );
function filter_function_name_9474( $value, $object_id, $meta_key, $single, $meta_type ){
	// filter...

	return $value;
The value to return, either a single metadata value or an array of values depending on the value of $single.
ID of the object metadata is for.
Metadata key.
Whether to return only the first value of the specified $meta_key.
Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.


Since 5.5.0 Introduced.

Where the hook is called

wp-includes/meta.php 652
$value = apply_filters( "default_{$meta_type}_metadata", $value, $object_id, $meta_key, $single, $meta_type );

Where in WP core the hook is used WordPress

wp-includes/meta.php 1387
add_filter( "default_{$object_type}_metadata", 'filter_default_metadata', 10, 5 );