[wp-trac] [WordPress Trac] #58546: Warn if _load_textdomain_just_in_time() is used before init
WordPress Trac
noreply at wordpress.org
Mon Sep 25 09:38:10 UTC 2023
#58546: Warn if _load_textdomain_just_in_time() is used before init
--------------------------+-----------------------------
Reporter: swissspidy | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
--------------------------+-----------------------------
Changes (by swissspidy):
* milestone: Awaiting Review => Future Release
Comment:
Alternatively, we could make `_load_textdomain_just_in_time()` do nothing
if called to early (i.e. if the `$current_user` global is `null` or if `!
did_action( 'init' ) && ! doing_action( 'init' )`).
This would cause `_load_textdomain_just_in_time()` to potentially be
called multiple times before init, but at least users would get the
correct translations all the time, preventing issues like
https://github.com/WordPress/health-check/issues/448
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58546#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list