clean_term_cache
Fires once after each taxonomy's term cache has been cleaned.
Usage
add_action( 'clean_term_cache', 'wp_kama_clean_term_cache_action', 10, 3 ); /** * Function for `clean_term_cache` action-hook. * * @param array $ids An array of term IDs. * @param string $taxonomy Taxonomy slug. * @param bool $clean_taxonomy Whether or not to clean taxonomy-wide caches * * @return void */ function wp_kama_clean_term_cache_action( $ids, $taxonomy, $clean_taxonomy ){ // action... }
- $ids(array)
- An array of term IDs.
- $taxonomy(string)
- Taxonomy slug.
- $clean_taxonomy(true|false)
- Whether or not to clean taxonomy-wide caches
Changelog
Since 2.5.0 | Introduced. |
Since 4.5.0 | Added the $clean_taxonomy parameter. |
Where the hook is called
clean_term_cache
wp-includes/taxonomy.php 3693
do_action( 'clean_term_cache', $ids, $taxonomy, $clean_taxonomy );