WordPress at Your Fingertips
filter is not described

update_(meta_type)_metadata filter-hook . WP 3.1.0

Short-circuits updating metadata of a specific type.

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


add_filter( 'update_(meta_type)_metadata', 'filter_function_name_1545', 10, 5 );
function filter_function_name_1545( $check, $object_id, $meta_key, $meta_value, $prev_value ){
	// filter...

	return $check;
Whether to allow updating metadata for the given type.
ID of the object metadata is for.
Metadata key.
Metadata value. Must be serializable if non-scalar.
Optional. Previous value to check before updating. If specified, only update existing metadata entries with this value. Otherwise, update all entries.


Since 3.1.0 Introduced.

Where the hook is called

wp-includes/meta.php 205
$check = apply_filters( "update_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $prev_value );

Where in WP core the hook is used WordPress

wp-includes/default-filters.php 112
add_filter( 'update_term_metadata', 'wp_check_term_meta_support_prefilter' );
wp-includes/ms-default-filters.php 63
add_filter( 'update_blog_metadata', 'wp_check_site_meta_support_prefilter' );