[wp-trac] [WordPress Trac] #12981: odd behavior of exclude_tree parameter in wp_list_categories()

WordPress Trac noreply at wordpress.org
Tue Sep 29 19:03:12 UTC 2015


#12981: odd behavior of exclude_tree parameter in wp_list_categories()
--------------------------+-----------------------
 Reporter:  tott          |       Owner:  tott
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.4
Component:  Taxonomy      |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by boonebgorges):

 * keywords:  has-patch dev-feedback => has-patch
 * milestone:  Future Release => 4.4


Comment:

 Thanks for the patches. It looks like the reason for the `if ( true ===
 $hierarchical )` block is to ensure that excluding a category also
 excludes its descendants. So wiping out `$r['exclude']` altogether doesn't
 seem like an acceptable strategy. We want to allow for the possibility
 that someone would pass `exclude` *as well as* `exclude_tree`, and have
 both of them (and their descendants) excluded from results.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/12981#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list