WordPress开发者和主题制作者的搜索引擎



update_postmeta_cache ›

Since2.1.0
已弃用n/a
update_postmeta_cache ( $post_ids )
参数:
  • (int[]) $post_ids Array of post IDs.
    Required: Yes
返回:
  • (array|false) Returns false if there is nothing to update or an array of metadata.
定义在:
文档:

Updates metadata cache for list of post IDs.

Performs SQL query to retrieve the metadata for the post IDs and updates the metadata cache for the posts. Therefore, the functions, which call this function, do not need to perform SQL queries on their own.



源码

function update_postmeta_cache( $post_ids ) {
	return update_meta_cache( 'post', $post_ids );
}