Opened 11 years ago
Closed 11 years ago
#32432 closed enhancement (fixed)
Allow wp_dropdown_languages() to return, instead of output, the markup.
| Reported by: | leewillis77 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.3 |
| Component: | I18N | Version: | 4.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
This allows the markup created by wp_dropdown_languages() to be re-used by other code without having to resort to output-buffering hacks.
Attachments (5)
Change History (17)
#1
@
11 years ago
We should probably create a get_ function for that, rather than introducing another argument.
#2
@
11 years ago
Thanks for the feedback. Any suggestions on how to achieve that without duplicating huge wedges of code or using output_buffering (Or is the use of output buffering acceptable?)
@
11 years ago
Revised patch. Introduces get_dropdown_languages(). Makes wp_dropdown_languages() use this to do the heavy lifting.
#5
@
11 years ago
- Keywords has-patch needs-refresh added
- Version trunk → 4.2
Related: #29362
I'm fine with adding an argument for returning the dropdown,I don't see the need for a get_ function here. We can use the existing $args argument and use echo as the key which is false per default. @leewillis77 do you want to make a new patch for this? For inspiration take a look at wp_dropdown_pages() or wp_dropdown_categories().
#7
follow-up:
↓ 8
@
11 years ago
Updates the docblock in @juliobox's patch to add the new arg.
Thanks
#8
in reply to: ↑ 7
@
11 years ago
My bad, thanks
Replying to leewillis77:
Updates the docblock in @juliobox's patch to add the new arg.
Thanks
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Proposed patch.