clean_term_cache
Fires once after each taxonomy's term cache has been cleaned.
Использование
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(массив)
- An array of term IDs.
- $taxonomy(строка)
- Taxonomy slug.
- $clean_taxonomy(true|false)
- Whether or not to clean taxonomy-wide caches
Список изменений
С версии 2.5.0 | Введена. |
С версии 4.5.0 | Added the $clean_taxonomy parameter. |
Где вызывается хук
clean_term_cache
wp-includes/taxonomy.php 3698
do_action( 'clean_term_cache', $ids, $taxonomy, $clean_taxonomy );