update_term_count
Fires when a term count is calculated, before it is updated in the database.
Использование
add_action( 'update_term_count', 'wp_kama_update_term_count_action', 10, 3 );
/**
* Function for `update_term_count` action-hook.
*
* @param int $tt_id Term taxonomy ID.
* @param string $taxonomy_name Taxonomy slug.
* @param int $count Term count.
*
* @return void
*/
function wp_kama_update_term_count_action( $tt_id, $taxonomy_name, $count ){
// action...
}
- $tt_id(int)
- Term taxonomy ID.
- $taxonomy_name(строка)
- Taxonomy slug.
- $count(int)
- Term count.
Список изменений
| С версии 6.9.0 | Введена. |
Где вызывается хук
wp-includes/taxonomy.php 4207
do_action( 'update_term_count', $tt_id, $taxonomy->name, $count );
wp-includes/taxonomy.php 4237
do_action( 'update_term_count', $term, $taxonomy->name, $count );