update_postmeta_cache

函数
update_postmeta_cache ( $post_ids )
参数
  • (int[]) $post_ids Array of post IDs.
    Required:
返回值
  • (array|false) An array of metadata on success, false if there is nothing to update.
定义位置
相关方法
update_sitemeta_cacheupdate_meta_cacheupdate_post_cacheupdate_post_cachesupdate_termmeta_cache
引入
2.1.0
弃用
-

update_postmeta_cache: 这个函数更新WordPress数据库中所有文章的元数据缓存。它不接受任何参数。

为一个文章ID列表更新元数据缓存。

执行SQL查询以检索文章ID的元数据,并更新文章的元数据缓存。因此,调用此函数的函数不需要自己执行SQL查询。

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 12:36:31

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: