A WordPress-centric search engine for devs and theme authors



wp_decrement_term_count ›

Since5.6.0
Deprecatedn/a
wp_decrement_term_count ( $tt_ids, $taxonomy, $decrement_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) $decrement_by By how many the term count is to be decremented. 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:

Decrements 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 decrement the count by one and update the database.


Source

function wp_decrement_term_count( $tt_ids, $taxonomy, $decrement_by = 1, $do_deferred = false ) {
	return wp_modify_term_count_by( $tt_ids, $taxonomy, $decrement_by * -1, $do_deferred );
}