Opened 17 years ago
Closed 17 years ago
#4182 closed enhancement (fixed)
Add ability to return list for wp_list_categories..
Reported by: | profdeadmeat | Owned by: | rob1n |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 2.1.3 |
Component: | Template | Keywords: | has-patch |
Focuses: | Cc: |
Description
Simply:
The function outputs directly to the page it does not allow any function to use the output.
Impact:
Plugins and templates which used the deprecated list_cats can not use the replacement.
Fix:
Change:
echo apply_filters('list_cats', $output);
To:
$output = apply_filters('list_cats', $output);
if ( $echo ) echo $output;
return $output;
Attachments (1)
Change History (9)
#1
@
17 years ago
- Component changed from Administration to Template
- Milestone changed from 2.1.4 to 2.2
- Priority changed from high to normal
- Severity changed from major to normal
- Summary changed from bug with wp_list_catories to Add ability to return list for wp_list_categories..
- Type changed from defect to enhancement
- Version changed from 2.1.2 to 2.1.3
Note: See
TracTickets for help on using
tickets.
This would make it similar to the functionality in wp_list_pages (and probably elsewhere too). Changes required are minimal.
At the end of wp_list_categories(), change the echo statement to this:
Add this to the $defaults array:
And there you go. This will allow an "echo" parameter similar to wp_list_pages() echo parameter.