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

WordPress Trac noreply at wordpress.org
Wed Oct 31 02:32:53 UTC 2018


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

Comment (by danielbachhuber):

 In [changeset:"43846" 43846]:
 {{{
 #!CommitTicketReference repository="" revision="43846"
 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.

 See #44758.
 Fixes #45235.
 }}}

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


More information about the wp-trac mailing list