Function: clean_object_term_cache

clean_object_term_cache( integer | array $object_ids, array | string $object_type )

Removes the taxonomy relationship to terms from the cache.

Shortcut: cotc

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

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.


Name Type(s) Default Value Description
$object_ids integer | array

Single or list of term object ID(s).

$object_type array | string

The taxonomy object type.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.