Opened 6 years ago
Closed 12 days ago
#39673 closed enhancement (wontfix)
wp_dropdown_languages() shows wrong list of installed languages, when 'languages' is empty
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.8 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
wp_dropdown_languages() shows wrong list of installed languages, when 'languages' is empty. That might be intentionally, but is still very confusing, because the values shown in the dropdown are wrong.
Improvement:
if ( empty( $args['languages'] ) ) {
$args['languages'] = get_available_languages();
}
Change History (1)
Note: See
TracTickets for help on using
tickets.
I think the expectation here is that the list of installed languages has to always be provided. That's how core and the few plugins using this function handle it. Quite useful because then you can easily only show the dropdown when there are actually some languages. Doesn't seem like it's worth adding such a default.