[wp-trac] [WordPress Trac] #63562: Term counts should not be recalculated when a post transitions between statuses that are not counted

WordPress Trac noreply at wordpress.org
Fri Jul 25 08:35:28 UTC 2025


#63562: Term counts should not be recalculated when a post transitions between
statuses that are not counted
----------------------------------------+--------------------------
 Reporter:  johnbillion                 |       Owner:  johnbillion
     Type:  defect (bug)                |      Status:  closed
 Priority:  normal                      |   Milestone:  6.9
Component:  Posts, Post Types           |     Version:
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  needs-unit-tests has-patch  |     Focuses:  performance
----------------------------------------+--------------------------
Changes (by johnbillion):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60510" 60510]:
 {{{
 #!CommitTicketReference repository="" revision="60510"
 Posts, Post Types: Don't unnecessarily recount terms when a post
 transitions between statuses that don't require them to be recounted.

 This accounts for transitions where:

 * Both the old and new statuses are not included in term counts.
 * Both the old and new statuses are included in term counts.

 This results in term counts only being recalculated when a post
 transitions between a counted and an uncounted status.

 If the terms of the post are changed then the term recounting is still
 handled by `wp_update_term_count()` inside `wp_set_object_terms()`.

 Props hbhalodia, johnbillion, peterwilsoncc, mukesh27.

 Fixes #63562
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63562#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list