Opened 10 years ago
Closed 10 years ago
#28083 closed defect (bug) (duplicate)
exclude_tree gets overwritten in wp_list_categories
Reported by: | MikeHansenMe | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
When using the function wp_list_categories and passing 'exclude_tree' the value gets overwritten by 'exclude' which by default is . This is because of the following lines in the function:
if ( true == $r['hierarchical'] ) { $r['exclude_tree'] = $r['exclude']; $r['exclude'] = ''; }
Hierarchical is true by default so unless you set that to false the code gets ran. Unless you pass a value to 'exclude' then the default overwrites 'exclude_tree' which may have been set.
I have included a patch and some unit tests for the wp_list_categories function.
Attachments (2)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Duplicate of #12981.