Definition:
function update_term_cache($terms, $taxonomy = '') {}
Updates Terms to Taxonomy in cache.
Parameters
- array $terms: List of Term objects to change
- string $taxonomy: Optional. Update Term to this taxonomy in cache
Source code
function update_term_cache($terms, $taxonomy = '') { foreach ( (array) $terms as $term ) { $term_taxonomy = $taxonomy; if ( empty($term_taxonomy) ) $term_taxonomy = $term->taxonomy; wp_cache_add($term->term_id, $term, $term_taxonomy); } }
3207
No comments yet... Be the first to leave a reply!