Removes the taxonomy relationship to terms from the cache.
Will remove the entire taxonomy relationship containing term $object_id. The term IDs have to exist within the taxonomy $object_type for the deletion to take place.
Signature
clean_object_term_cache( $object_ids, $object_type )
- object_ids
- (int|array) Single or list of term object ID(s)
- object_type
- (array|string) The taxonomy object type
Return
(void)
Source
function clean_object_term_cache($object_ids, $object_type) {
if ( !is_array($object_ids) )
$object_ids = array($object_ids);
$taxonomies = get_object_taxonomies( $object_type );
foreach ( $object_ids as $id )
foreach ( $taxonomies as $taxonomy )
wp_cache_delete($id, "{$taxonomy}_relationships");
do_action('clean_object_term_cache', $object_ids, $object_type);
}
WP Trac GitHub Bitbucket
Link here
-
URL
http://queryposts.com/function/clean_object_term_cache/ -
HTML
<a href='http://queryposts.com/function/clean_object_term_cache/'>clean_object_term_cache()</a> -
Markdown
[clean_object_term_cache()](http://queryposts.com/function/clean_object_term_cache/) -
BBCode
[url=http://queryposts.com/function/clean_object_term_cache/]clean_object_term_cache()[/url]