wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
update_term_cache › WordPress Function
Seit2.3.0
Veraltetn/v
› update_term_cache ( $terms, $taxonomy = '' )
Parameter: (2) |
|
Definiert in: |
|
Codex: |
Updates Terms to Taxonomy in cache.
Ähnliche Funktionen: update_termmeta_cache, update_site_cache, update_user_caches, update_sitemeta_cache, update_category_cache
Quellcode
function update_term_cache( $terms, $taxonomy = '' ) { 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 ); wp_cache_add( $term->term_id, $_term, 'terms' ); } }