[wp-trac] [WordPress Trac] #62858: doing_it_wrong when trying to set up user too early
WordPress Trac
noreply at wordpress.org
Fri Jan 24 13:52:19 UTC 2025
#62858: doing_it_wrong when trying to set up user too early
-------------------------+-----------------------------
Reporter: kkmuffme | Owner: swissspidy
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
As seen in https://core.trac.wordpress.org/ticket/59000 and similar to the
load translations early error
https://core.trac.wordpress.org/changeset/59127 lots of plugins try to
load the user too early.
It's supposed to happen right before init https://github.com/WordPress
/wordpress-develop/blob/771ef176d770dce40491d39007262d308d08585d/src/wp-
settings.php#L690-L691 or right after setup_theme if in the admin
https://github.com/WordPress/wordpress-
develop/blob/771ef176d770dce40491d39007262d308d08585d/src/wp-
settings.php#L640-L641
Suggestion: use a doing it wrong error, if the user is being set before
that in the same way it was done for loading translations early
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62858>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list