wppaste
WordPress

do_action( 'update_term_count', int $tt_id, string $taxonomy_name, int $count )

Since
6.9.0
Fires when a term count is calculated, before it is updated in the database.

Compatibility

WordPress
since 6.9.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in 3 of the 5 tracked releases, added in 6.9.0.

Parameters

$tt_idint
Term taxonomy ID.
$taxonomy_namestring
Taxonomy slug.
$countint
Term count.

Where this hook fires · 2

  • wp-includes/taxonomy.php:4249_update_post_term_count()
  • wp-includes/taxonomy.php:4279_update_generic_term_count()

Source code

		 * @since 6.9.0		 *		 * @param int    $tt_id         Term taxonomy ID.		 * @param string $taxonomy_name Taxonomy slug.		 * @param int    $count         Term count.		 */		do_action( 'update_term_count', $tt_id, $taxonomy->name, $count ); 		/** This action is documented in wp-includes/taxonomy.php */		do_action( 'edit_term_taxonomy', $tt_id, $taxonomy->name, array() );		$wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $tt_id ) ); 		/** This action is documented in wp-includes/taxonomy.php */

Changelog

Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.

  1. 6.9.7
  2. 7.0.4
  3. 7.1.0

Signature, return type and hooks compared across 3 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.