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.
Parameters
- $term_ids
-
(array) (Required) List of term IDs.
Return
(array|false) Returns false if there is nothing to update. Returns an array of metadata on success.
Source
File: wp-includes/taxonomy.php
function update_termmeta_cache( $term_ids ) {
// Bail if term meta table is not installed.
if ( get_option( 'db_version' ) < 34370 ) {
return;
}
return update_meta_cache( 'term', $term_ids );
}
Changelog
Version | Description |
---|---|
WP-4.4.0 | Introduced. |