[wp-trac] [WordPress Trac] #36819: Load plugin.php earlier in wp-settings.php
WordPress Trac
noreply at wordpress.org
Fri Aug 12 19:01:32 UTC 2016
#36819: Load plugin.php earlier in wp-settings.php
----------------------------+-----------------------
Reporter: jorbin | Owner: jorbin
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 4.6
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+-----------------------
Comment (by westi):
Replying to [comment:39 jorbin]:
> I don't think reverting is a good idea.
>
> As `advance-cache.php` is something that isn’t a part of the plugin
system, there isn’t a good way to update them. I think if you asked most
users “Are you using an advance cache dropin?” they wouldn’t be able to
give you a solid answer. So we have the potential to break sites
unintentionally. Is that a change we really want to make after RC2? What
is the benefit of reverting? What do we gain?
>
I'm still not sure how the code we have in trunk stops a site breaking
because of this change.
From what I can see the code we have in trunk ensures that if someone uses
`add_action` or `add_filter` before the advanced-cache is includes in new
code (they couldn't use them previously) that they will be protected from
their existing advanced-cache drop-in from trampling on this call by
setting a new array in the globals.
If someone was already writing to these arrays using a prepend-file or
other hackery and then mutating them in their advanced-cache they are
fine.
If someone was already writing to these arrays using a prepend-file or
other hackery and then resetting them to empty arrays in their advanced-
cache, and unwittingly relying on this behaviour, this change breaks them.
I think allowing people to use plugin api functions earlier is great, I
just don't understand why users of advanced-cache drop-ins need this extra
hand holding which just seems to waste cpu cycles for the exact set of
people who are trying to make their sites faster.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36819#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list