[wp-trac] [WordPress Trac] #14084: Custom taxonomy count includes draft & trashed posts

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 7 14:07:05 UTC 2011


#14084: Custom taxonomy count includes draft & trashed posts
-------------------------------------------------+-------------------------
 Reporter:  lumpysimon                           |       Owner:  garyc40
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
Component:  Taxonomy                             |  Release
 Severity:  normal                               |     Version:  3.0
 Keywords:  has-patch needs-testing 3.2-early    |  Resolution:
  dev-feedback                                   |
-------------------------------------------------+-------------------------

Comment (by garyc40):

 Sorry, attached the wrong 16118.2.diff patch. You should look at
 14084.2.diff (the latest one) instead.

 Using {{{wp_filter_object_list()}}} makes me realize that this function
 only filter superficially. Let's say if I want to:

 {{{
 wp_filter_object_list( array_values( $wp_taxonomies ), array(
 'object_type' => array( 'post' ) ) );
 }}}

 This will return all sorts of taxonomies, even those that have
 {{{object_type == array( 'nav_menu_item' ) }}} .

 In other words, {{{wp_filter_object_list()}}} doesn't filter deep enough.
 What do you think? Should we enhance {{{wp_filter_object_list()}}} to also
 filter inside properties of the list item?

 If we enhance that function, we might be able to get rid of the
 {{{foreach}}} loop inside {{{get_object_taxonomies()}}}.

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


More information about the wp-trac mailing list