[wp-trac] [WordPress Trac] #15347: Confirm matching taxonomy in wp_list_categories()

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 9 01:19:36 UTC 2010


#15347: Confirm matching taxonomy in wp_list_categories()
--------------------------+-------------------------------------------------
 Reporter:  nacin         |       Owner:     
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.1
Component:  Taxonomy      |     Version:     
 Severity:  normal        |    Keywords:     
--------------------------+-------------------------------------------------
 In wp_list_categories(), we detect the current category using the queried
 object. But, we don't check if the taxonomy of the queried object matches
 what we're displaying with wp_list_categories(). Clearly, the current
 category for purposes of listing categories needs to be the same taxonomy.

 A get_term() call in Walker_Category will end up failing and we'll end up
 with warnings for trying to access non-existent properties. I traced that
 up the stack to here.

 Also adding in is_tag() to the current term check because there's no
 reason why someone can't use wp_list_categories() for any taxonomy AFAIK.

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


More information about the wp-trac mailing list