WPDev.one
Core Function
View Source on Trac ↗

update_post_caches()

update_post_caches( mixed $posts, mixed $post_type = 'post', mixed $update_term_cache = true, mixed $update_meta_cache = true )

Updates post, term, and metadata caches for a list of post objects.

Parameters 1 required

Name / Type Description
$posts
WP_Post[]

Array of post objects (passed by reference).

Required
$post_type
string

Optional. Post type. Default 'post'.

$update_term_cache
bool

Optional. Whether to update the term cache. Default true.

$update_meta_cache
bool

Optional. Whether to update the meta cache. Default true.

Return Value

(void)
No return value description available.

Function Information

Since Version
1.5.0
Source File
wp-includes/post.php
Advertisement