[wp-trac] [WordPress Trac] #57123: Make it easier to switch to a user's locale

WordPress Trac noreply at wordpress.org
Sat Feb 4 20:45:50 UTC 2023


#57123: Make it easier to switch to a user's locale
---------------------------------------------+-------------------------
 Reporter:  swissspidy                       |       Owner:  swissspidy
     Type:  enhancement                      |      Status:  closed
 Priority:  normal                           |   Milestone:  6.2
Component:  I18N                             |     Version:  4.7
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch commit has-unit-tests  |     Focuses:
---------------------------------------------+-------------------------

Comment (by swissspidy):

 In [changeset:"55224" 55224]:
 {{{
 #!CommitTicketReference repository="" revision="55224"
 I18N: Improve method names in `WP_Locale_Switcher()`.

 This is a follow-up to [55161] to rename `::get_current_locale()` to
 `::get_switched_locale()` and `::get_current_user_id()` to
 `::get_switched_user_id()` for improved clarity.

 Also:

 * Fix docblock for `switch_locale` filter. The User ID is `false` if
 missing, not `null`.
 * Add additional test involving `restore_previous_locale()` and improve
 test cleanup.

 And most importantly: happy birthday ocean90! 🎂

 Props johnjamesjacoby, ocean90.
 See #57123.
 }}}

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


More information about the wp-trac mailing list