[wp-trac] [WordPress Trac] #18986: Link categories filter doesn't show all categories

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 21 00:30:46 UTC 2011

#18986: Link categories filter doesn't show all categories
 Reporter:  ocean90       |       Owner:  ryan
     Type:  defect (bug)  |      Status:  reopened
 Priority:  high          |   Milestone:  3.3
Component:  Taxonomy      |     Version:  3.3
 Severity:  major         |  Resolution:
 Keywords:  has-patch     |

Comment (by nacin):

 [attachment:18986.diff] takes a step back and approaches this from a
 different perspective.

 Essentially, link_category should never be using
 _update_post_term_count(). In 3.2, it was using the generic handler, which
 was inline. In 3.3, all taxonomies by default now use
 _update_post_term_count(). This includes not only link_category, but all
 custom taxonomies. This will change how custom taxonomies attached to
 posts are counted, assuming they don't specify an update_count_callback. I
 always forget to, so perhaps this would normally be for the better for
 developers in general, but it is technically a backwards incompatible
 change that will make counts drop pretty quickly.

 (Reference thus far: [18783/trunk/wp-includes/taxonomy.php], via #17548.)

 So I think what we need to do is create a new generic handler,
 _update_generic_term_count(). This does restore the original behavior that
 was changed in #17548, but it doesn't do so at the expense of all other

 Note that the patch makes this handler the default callback. I don't know
 if that's the best idea, given the comments in #17548. So it sounds like
 maybe we need to do some detection on $object_types when choosing our
 default callback. If it's nothing but post types, then use
 _update_post_term_count(), otherwise, we'll need to use the generic

Ticket URL: <http://core.trac.wordpress.org/ticket/18986#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list