[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:59:00 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                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by danieltj):

 `wp_dropdown_languages()` already supports `$args` so I'm in favour of
 supporting another argument in that array to exclude certain locales by
 slug or something.

 `languages` is also already supported though; I suppose you could reverse
 engineer it so you get the full list list of locales, then remove en_US
 and then use the updated list (minus en_US) to request as those specific
 locales. Not ideal, but serves as a better work around than JavaScript
 perhaps.

 Ref:
 https://developer.wordpress.org/reference/functions/wp_dropdown_languages/

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


More information about the wp-trac mailing list