[wp-trac] [WordPress Trac] #17548: wp_trash_post() does not call update_post_count()

WordPress Trac wp-trac at lists.automattic.com
Tue May 24 10:33:17 UTC 2011


#17548: wp_trash_post() does not call update_post_count()
--------------------------+-----------------------------
 Reporter:  joehoyle      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  3.2
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Calling `wp_trash_post()` on either a custom post type of a post does not
 update the term counts until it has been it is "permanently deleted",
 however `_update_post_term_count()` (which is the default
 "update_count_callback" for tags and categories) calculates the term coint
 based of published posts. This means if you trash hundreds of posts -
 without emptying the trash, the term counts become way out.

 To me, it would make sense for `wp_trash_post()` to call
 update_term_count() if the "update_count_callback" is
 "_update_post_term_count()" (as we know it will be calculating term count
 sbased off published status)

 I can create a patch if this is accepted

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17548>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list