update_user_metadata_cache filter-hookWP 5.0.0

Short-circuits updating the metadata cache of a specific type.

This is one of the variants of the dynamic hook update_(meta_type)_metadata_cache

Usage

add_filter( 'update_user_metadata_cache', 'wp_kama_update_user_metadata_cache_filter', 10, 2 );

/**
 * Function for `update_user_metadata_cache` filter-hook.
 * 
 * @param mixed $check      Whether to allow updating the meta cache of the given type.
 * @param int[] $object_ids Array of object IDs to update the meta cache for.
 *
 * @return mixed
 */
function wp_kama_update_user_metadata_cache_filter( $check, $object_ids ){

	// filter...
	return $check;
}
$check(mixed)
Whether to allow updating the meta cache of the given type.
$object_ids(int[])
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_user_metadata_cache
wp-includes/meta.php 1151
$check = apply_filters( "update_{$meta_type}_metadata_cache", null, $object_ids );

Where the hook is used in WordPress

Usage not found.