[wp-trac] [WordPress Trac] #35156: wp_list_categories() does not accept comma-separated IDs for exclude_tree parameter

WordPress Trac noreply at wordpress.org
Fri Dec 18 14:57:39 UTC 2015


#35156: wp_list_categories() does not accept comma-separated IDs for exclude_tree
parameter
--------------------------+-----------------------------
 Reporter:  gblsm         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  4.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 This does not work:

 {{{
 wp_list_categories( array( 'exclude_tree' => '9,10' ) );
 }}}

 as only the category ID=9 and its descendants will be excluded, while
 ID=10 will be included.
 But this works:

 {{{
 wp_list_categories( array( 'exclude_tree' => array( 9, 10 ) ) );
 }}}

 as the categories ID=9, 10 and their descendants will be excluded.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35156>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list