Opened 9 years ago
Closed 9 years ago
#32432 closed enhancement (fixed)
Allow wp_dropdown_languages() to return, instead of output, the markup.
Reported by: | leewillis77 | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
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
@
9 years ago
We should probably create a get_
function for that, rather than introducing another argument.
#2
@
9 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?)
@
9 years ago
Revised patch. Introduces get_dropdown_languages(). Makes wp_dropdown_languages() use this to do the heavy lifting.
#5
@
9 years ago
- Keywords has-patch needs-refresh added
- Version changed from trunk to 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
@
9 years ago
Updates the docblock in @juliobox's patch to add the new arg.
Thanks
#8
in reply to:
↑ 7
@
9 years ago
My bad, thanks
Replying to leewillis77:
Updates the docblock in @juliobox's patch to add the new arg.
Thanks
Proposed patch.