apply_filters( "update_{$meta_type}_metadata_cache", mixed $check, int[] $object_ids )
- Since
- 5.0.0
Short-circuits updating the metadata cache of a specific type.
Description
The dynamic portion of the hook name, $meta_type, refers to the meta object type (blog, post, comment, term, user, or any other type with an associated meta table).
Returning a non-null value will effectively short-circuit the function.
Possible hook names include:
update_blog_metadata_cacheupdate_post_metadata_cacheupdate_comment_metadata_cacheupdate_term_metadata_cacheupdate_user_metadata_cache
Compatibility
- WordPress
- since 5.0.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$checkmixed- Whether to allow updating the meta cache of the given type.
$object_idsint[]- Array of object IDs to update the meta cache for.
Where this hook fires · 1
wp-includes/meta.php:1178update_meta_cache()
Source code
* * @since 5.0.0 * * @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. */ $check = apply_filters( "update_{$meta_type}_metadata_cache", null, $object_ids ); if ( null !== $check ) { return (bool) $check; } $cache_group = $meta_type . '_meta'; $non_cached_ids = array();Changelog
Introduced in 5.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.