update_termmeta_cache() WordPress Function

The update_termmeta_cache() function is used to update the metadata cache for the given terms. This is useful when you need to update the cache after changing term meta data.

update_termmeta_cache( array $term_ids ) #

Updates metadata cache for list of term IDs.


Description

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() will not need to query the database.


Top ↑

Parameters

$term_ids

(array)(Required)List of term IDs.


Top ↑

Return

(array|false) An array of metadata on success, false if there is nothing to update.


Top ↑

Source

File: wp-includes/taxonomy.php

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


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More