update_post_metadata_cache хук-фильтрWP 5.0.0

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

Это один из вариантов динамического хука update_(meta_type)_metadata_cache

Использование

add_filter( 'update_post_metadata_cache', 'wp_kama_update_post_metadata_cache_filter', 10, 2 );

/**
 * Function for `update_post_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_post_metadata_cache_filter( $check, $object_ids ){

	// filter...
	return $check;
}
$check(разное)
Whether to allow updating the meta cache of the given type.
$object_ids(int[])
Array of object IDs to update the meta cache for.

Список изменений

С версии 5.0.0 Введена.

Где вызывается хук

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

Где используется хук в WordPress

Использование не найдено.