[wp-trac] [WordPress Trac] #43869: Do not initialize current user too early in `get_user_locale()`
WordPress Trac
noreply at wordpress.org
Mon Oct 21 15:23:00 UTC 2024
#43869: Do not initialize current user too early in `get_user_locale()`
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Future
| Release
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd- | Focuses:
opinion |
-------------------------------------------------+-------------------------
Comment (by swissspidy):
With #44937 there is now a `_doing_it_wrong` when a plugin or theme loads
translations too early (and thus calls `get_user_locale()` too early. See
https://make.wordpress.org/core/2024/10/21/i18n-improvements-6-7/
That change probably the most common scenario where `get_user_locale()` is
called, but of course there can still be other code paths.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43869#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list