[wp-trac] [WordPress Trac] #29362: More development for wp_dropdown_languages()

WordPress Trac noreply at wordpress.org
Thu Oct 30 00:51:44 UTC 2014


#29362: More development for wp_dropdown_languages()
------------------------------------+------------------------------
 Reporter:  alex-ye                 |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  I18N                    |     Version:  4.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by khromov):

 * keywords:  needs-refresh has-patch => has-patch dev-feedback


Comment:

 The code has changed around qite a bit since the patch by @alex-ye, so I
 made another patch:

 '''Changes'''

 wp_dropdown_languages() is used twice, in option-general.php and in
 /network/settings.php

 In network settings.php, the site locale is correctly fetched from the
 database. In option-general.php, we call get_locale() instead which
 doesn't check the database. That's why hooking on the locale filter has
 unintended consequences, which were outlined earlier here:

 https://core.trac.wordpress.org/ticket/29362#comment:5

 In the patch, I refactored option-general.php to grab the settings from
 the database just like the network settings. Feedback appreciated.

 PS.
 I didn't add a filter, this patch is just for fixing inconsistent
 behaviour.

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


More information about the wp-trac mailing list