update_termmeta_cache

函式
update_termmeta_cache ( $term_ids )
引數
  • (array) $term_ids List of term IDs.
    Required:
返回值
  • (array|false) An array of metadata on success, false if there is nothing to update.
定義位置
相關方法
update_sitemeta_cacheupdate_term_cacheupdate_meta_cacheupdate_postmeta_cacheupdate_comment_cache
引入
4.4.0
棄用
-

update_termmeta_cache: 這個函式更新分類法術語後設資料的快取。它通常在術語的後設資料被更新後被呼叫,比如當一個外掛設定被改變時。

更新術語ID列表的後設資料快取。

執行SQL查詢,檢索與`$term_ids`匹配的術語的所有後設資料,並將它們儲存在快取中。以後呼叫`get_term_meta()`就不需要再查詢資料庫了。

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

常見問題

FAQs
檢視更多 >