wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
update_term_cache › WordPress Function
Depuis2.3.0
Dépréciéen/a
› update_term_cache ( $terms, $taxonomy = '' )
Paramètres: (2) |
|
Défini(e) dans: |
|
Codex: |
Updates terms in cache.
Fonctions en relation: update_termmeta_cache, update_site_cache, update_user_caches, update_category_cache, update_sitemeta_cache
Source
function update_term_cache( $terms, $taxonomy = '' ) { $data = array(); foreach ( (array) $terms as $term ) { // Create a copy in case the array was passed by reference. $_term = clone $term; // Object ID should not be cached. unset( $_term->object_id ); $data[ $term->term_id ] = $_term; } wp_cache_add_multiple( $data, 'terms' ); }