[wp-trac] [WordPress Trac] #44494: Add option to hide en_US in wp_dropdown_languages()

WordPress Trac noreply at wordpress.org
Tue Jul 3 06:38:49 UTC 2018


#44494: Add option to hide en_US in wp_dropdown_languages()
--------------------------+----------------------------------------
 Reporter:  swissspidy    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  I18N          |    Version:
 Severity:  normal        |   Keywords:  needs-patch good-first-bug
  Focuses:                |
--------------------------+----------------------------------------
 While working on the [https://make.wordpress.org/core/2016/10/18
 /preferred-languages/ Preferred Languages] project I noticed that it's not
 possible to hide the `English (United States)` option in
 `wp_dropdown_languages()`.

 In my case, I do not need the en_US because of the way the UI works: When
 I do not pick a language from the dropdown, en_US will be the default.
 Screenshot: https://cloudup.com/cXhxw4KPqFc

 While I added a workaround using JavaScript, I think there should be a) a
 `show_option_en_US` parameter or b) a filter (e.g. `$output =
 apply_filters( 'wp_dropdown_languages', $output, $languages, $parsed_args
 )`) at the end of the function. Or perhaps even both.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44494>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list