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查詢。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function update_postmeta_cache( $post_ids ) {
return update_meta_cache( 'post', $post_ids );
}
function update_postmeta_cache( $post_ids ) { return update_meta_cache( 'post', $post_ids ); }
function update_postmeta_cache( $post_ids ) {
	return update_meta_cache( 'post', $post_ids );
}

常見問題

FAQs
檢視更多 >