[wp-trac] [WordPress Trac] #44758: The REST API is not respecting the user's locale properly.

WordPress Trac noreply at wordpress.org
Fri Dec 14 12:14:19 UTC 2018


#44758: The REST API is not respecting the user's locale properly.
---------------------------------+-----------------------
 Reporter:  youknowriad          |       Owner:  pento
     Type:  enhancement          |      Status:  closed
 Priority:  normal               |   Milestone:  5.0
Component:  REST API             |     Version:
 Severity:  normal               |  Resolution:  fixed
 Keywords:  has-patch fixed-5.0  |     Focuses:  rest-api
---------------------------------+-----------------------

Comment (by atimmer):

 In [changeset:"44181" 44181]:
 {{{
 #!CommitTicketReference repository="" revision="44181"
 l10n: Avoid calling is_user_logged_in() in determine_locale().

 is_user_logged_in() is a pluggable function, and loaded after plugins are
 loaded. If a plugin calls __() too early, is_user_logged_in() is missing
 and WordPress will fatal. get_user_locale() already handles this scenario
 for us, so it's safe to rely on exclusively.

 Props danielbachhuber.
 Merges [43846] to trunk.
 See #44758.
 Fixes #45235.
 }}}

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


More information about the wp-trac mailing list