-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add warnings if loading translations too early #6462
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Looking into warnings emitted by themes, such as Some observations:
At this point |
@ocean90 @SergeyBiryukov @johnbillion Is this something one of you could provide feedback on? I think it's a nice safeguard that could still land before the beta, but it also might be a bit noisy. |
This could be noisy but it might be interesting to see if any feedback about that is raised during beta. |
Committed in https://core.trac.wordpress.org/changeset/59127 |
In my quick local testing I already identified a few plugins doing
load_plugin_textdomain()
wrong:Plugins doing just-in-time loading wrong:
To-do:
_load_textdomain_just_in_time
case, mentioning that it's typically caused by unintended side effects in a plugin or theme.after_setup_theme
, which runs right beforeinit
and current user setup. Probably all classic themes will be affected by this.Strangely, when one of these plugins and Query Monitor is active, there is some sort of infinite loop happening and the site crashes with a 500. @johnbillion Any thoughts why QM might run in circles here?
Trac ticket: https://core.trac.wordpress.org/ticket/44937
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.