#1270 closed enhancement (fixed)
Add "echo" option to wp_list_pages ( as well as _page_level_out() )
| Reported by: | MC_incubus | Owned by: | ryan |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | General | Version: | 1.5.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
wp_list_pages() and _page_level_out() both have hardcoded echoes. The enclosed patch gives each an echo switch, while maintaining backwards compat.
Attachments (1)
Change History (7)
#4
@
22 years ago
Well, the use case for me was that I wanted to use wp_list_pages() in a 'the_content' filter. Wrote a plugin that replaces <!--subpages--> with the list of pages under that current page (had a lot of requests for this).
So I need to be able to do a str_replace() to put in wp_list_pages() for <!--subpages-->
Yes, I could make a copy of the function, rename it, and modify it... but that seems silly when all I need is wp_list_pages() with a return instead of an echo.
#5
@
22 years ago
- fixed_in_version → 1.5.1
- Owner changed from to
- Resolution 10 → 20
- Status new → closed
Okay. It's in there.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
What's the use case? Someone who doesn't want to echo would probably be using get_pages() so that they could do their own thing, yes?