update_post_caches
update_post_caches ( $posts, $post_type = 'post', $update_term_cache = true, $update_meta_cache = true )
Parameters:- (WP_Post[]) posts Array of post objects (passed by reference).
- (string) post_type Optional. Post type. Default 'post'.
- (bool) update_term_cache Optional. Whether to update the term cache. Default true.
- (bool) update_meta_cache Optional. Whether to update the meta cache. Default true.
Defined at: - Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
Description
Updates post, term, and metadata caches for a list of post objects.