Opened 3 years ago

Last modified 3 years ago

#12981 assigned defect (bug)

odd behavior of exclude_tree parameter in wp_list_categories()

Reported by: tott Owned by: tott
Priority: normal Milestone: Future Release
Component: Taxonomy Version: 3.0
Severity: normal Keywords: has-patch 2nd-opinion
Cc: kevinB

Description

When running a query such as

<?php wp_list_categories('title_li=&exclude_tree=1234&orderby=name&order=ASC'); ?>

the exclude_tree parameter is not obeyed as [10276] introduced a change that would overwrite it with the exclude parameter.

Attachments (1)

exclude_tree.diff (545 bytes) - added by tott 3 years ago.
Possible patch for exclude_tree problem in wp_list_categories()

Download all attachments as: .zip

Change History (8)

tott3 years ago

Possible patch for exclude_tree problem in wp_list_categories()

  • Milestone changed from Unassigned to 3.0
  • Owner changed from filosofo to tott
  • Status changed from new to assigned
  • Version set to 3.0
  • Keywords has-patch added

We've had this this way since 2.7.x at this point, though the patch looks good. I can't see anything it would break. Actually, exclude_tree was added in r10276, so it's never worked properly -- we can probably punt this in that case.

comment:4   ryan3 years ago

  • Milestone changed from 3.0 to 3.1
  • Cc kevinB added

exclude_tree doesn't work when hide_empty=0, it must must be set to 1 (hide empty)...

  • Keywords 2nd-opinion added; exclude_tree wp_list_categories category removed
  • Milestone changed from Awaiting Triage to Future Release
Note: See TracTickets for help on using tickets.