update_termmeta_cache()WP 4.4.0

Updates metadata cache for list of term IDs.

Performs SQL query to retrieve all metadata for the terms matching $term_ids and stores them in the cache. Subsequent calls to get_term_meta() not need to query the database.

Хуков нет.


Массив|false. An array of metadata on success, false if there is nothing to update.


update_termmeta_cache( $term_ids );
$term_ids(массив) (обязательный)
List of term IDs.

Список изменений

С версии 4.4.0 Введена.

Код update_termmeta_cache() WP 6.3.1

function update_termmeta_cache( $term_ids ) {
	return update_meta_cache( 'term', $term_ids );