wp_update_term_count

SummerySummery

Updates the amount of terms in taxonomy.

Syntax

wp_update_term_count( int|array $terms, string $taxonomy, bool $do_deferred = false )

DescriptionDescription

If there is a taxonomy callback applied, then it will be called for updating the count.

The default action is to count what the amount of terms have the relationship of term ID. Once that is done, then update the database.

ParametersParameters

$terms

(int|array) (Required) The term_taxonomy_id of the terms.

$taxonomy

(string) (Required) The context of the term.

$do_deferred

(bool) (Optional) Whether to flush the deferred term counts too.

Default value: false

ReturnReturn

(bool) If no terms will return false, and if successful will return true.

SourceSource

File: wp-includes/taxonomy.php


			

ChangelogChangelog

Changelog
Version Description
2.3.0 Introduced.
Scroll to Top