WordPress at a glance
filter is not described

update_(meta_type)_metadata_cache filter-hook . WP 5.0.0

Filters whether to update the metadata cache of a specific type.

The dynamic portion of the hook, $meta_type, refers to the meta object type (comment, post, term, or user). Returning a non-null value will effectively short-circuit the function.

Usage

add_filter( 'update_(meta_type)_metadata_cache', 'filter_function_name_4383', 10, 2 );
function filter_function_name_4383( $check, $object_ids ){
	// filter...

	return $check;
}
$check(mixed)
Whether to allow updating the meta cache of the given type.
$object_ids(array)
Array of object IDs to update the meta cache for.

Changelog

Since 5.0.0 Introduced.

Where the hook is called

update_meta_cache()
update_(meta_type)_metadata_cache
wp-includes/meta.php 911
$check = apply_filters( "update_{$meta_type}_metadata_cache", null, $object_ids );

Where the hook is used (in WP core)

wp-includes/default-filters.php 117
add_filter( 'update_term_metadata_cache', 'wp_check_term_meta_support_prefilter' );
wp-includes/ms-default-filters.php 67
add_filter( 'update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter' );
wp-includes/ms-site.php 393
add_filter( 'update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter' );