#5004 closed enhancement (duplicate)
Allow Setting The Depth On wp_list_categories
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.3 |
Component: | General | Keywords: | category depth has-patch dev-feedback |
Focuses: | Cc: |
Description
Attached is a path to add a depth query argument for wp_list_categories. It defaults to 0 which will walk the entire hierarchy. If hierarchical=false then the flat list is given and depth is ignored.
Attachments (1)
Change History (8)
#4
@
18 years ago
Note: the post got corrupted when I submitted it. I'll attach a file with the diff.
#5
@
18 years ago
Hrmm don't have permission to.. okay lets try this;
diff category-template.php category-template.php.bak 253c253 < 'echo' => 1, 'depth' => 0 --- > 'echo' => 1 292c292 < $depth = $r['depth']; // Walk requested depth (0 being full depth). --- > $depth = 0; // Walk the full depth.
Note: See
TracTickets for help on using
tickets.
It looks like this has been "Mostly" implemented with one minor change.
Change line 292 to;
This way the user can actually specify the depth they want it to be walked via the argument. Otherwise it was just 0 or -1 which doesn't actually do what this RFE had intended.
(Heres the diff since I'm not sure how you guys want it..)
[palamedes]$ diff category-template.php category-template.php.old
253c253
< 'echo' => 1, 'depth' => 0
---
292c292
< $depth = $rdepth?; Walk requested depth (0 being full depth).
---