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

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 9 14:19:39 UTC 2011


#17548: wp_trash_post() does not call update_post_count()
-------------------------------------------------+-------------------------
 Reporter:  joehoyle                             |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Taxonomy                             |  Release
 Severity:  normal                               |     Version:  3.2
 Keywords:  has-patch dev-feedback needs-        |  Resolution:
  testing                                        |
-------------------------------------------------+-------------------------
Changes (by joehoyle):

 * cc: joehoyle@… (added)
 * keywords:  needs-patch => has-patch dev-feedback needs-testing


Comment:

 I have added a patch to call `update_post_term_count()` on
 `transition_post_status()` (but only taxonomies with an
 `update_count_callback` defined.

 Not sure if it would be best to split this into a function, and add it via
 `add_filter( 'transition_post_status',
 'wp_update_term_count_on_transition_status' )` or something?

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


More information about the wp-trac mailing list