A WordPress-centric search engine for devs and theme authors



wp_increment_term_count ›

Since5.6.0
Deprecatedn/a
wp_increment_term_count ( $tt_ids, $taxonomy, $increment_by = 1, $do_deferred = false )
Parameters: (4)
  • (int|array) $tt_ids The term_taxonomy_id of the terms.
    Required: Yes
  • (string) $taxonomy The context of the term.
    Required: Yes
  • (int) $increment_by By how many the term count is to be incremented. Default 1.
    Required: No
    Default: 1
  • (bool) $do_deferred Whether to flush the deferred term counts too. Default false.
    Required: No
    Default: false
Returns:
  • (bool) If no terms will return false, and if successful will return true.
Defined at:
Codex:

Increments the amount of terms in taxonomy.

If there is a taxonomy callback applied, then it will be called for updating the count. The default action is to increment the count by one and update the database.


Source

function wp_increment_term_count( $tt_ids, $taxonomy, $increment_by = 1, $do_deferred = false ) {
	return wp_modify_term_count_by( $tt_ids, $taxonomy, $increment_by, $do_deferred );
}