[wp-trac] [WordPress Trac] #36819: Load plugin.php earlier in wp-settings.php

WordPress Trac noreply at wordpress.org
Thu Aug 11 07:18:05 UTC 2016


#36819: Load plugin.php earlier in wp-settings.php
------------------------------------------+---------------------
 Reporter:  jorbin                        |       Owner:  jorbin
     Type:  task (blessed)                |      Status:  closed
 Priority:  normal                        |   Milestone:  4.6
Component:  Bootstrap/Load                |     Version:
 Severity:  normal                        |  Resolution:  fixed
 Keywords:  has-patch 2nd-opinion commit  |     Focuses:
------------------------------------------+---------------------

Comment (by westi):

 Replying to [comment:34 pento]:
 > Replying to [comment:33 westi]:
 > > If prior to this change a drop in was setting any of things things to
 an empty array and prior to it being called the array has something in it
 got lost.
 > >
 > > After this change we now reverse that behaviour on existing
 sites...... and ensure that instead that entry that was lost (and the site
 was running fine with it lost) now persists.
 >
 > Previously, I wouldn't be wildly concerned either way. But by moving the
 `plugin.php` load up to before the drop-in is loaded, we're now supporting
 hooks before then. I'm reasonably comfortable with external tools (wp-cli
 is the obvious example) being able to define their own hooks in
 `$wp_filter` before they even load WordPress.
 >
 > Drop-ins don't get to accidentally stomp on things that are actually
 supported.
 >
 > > Are we creating work trying to fix a bug that doesn't really "exist"
 here?
 >
 > Maybe. As [comment:2 dion mentioned], there are probably drop-ins who
 stomp on the global, expecting that they need to define it. Most of the
 code here is to take care of that situation.

 I get that.

 But this code is here to fix bugs in other peoples code that previously
 didn't break something and only break something if they also add other new
 code to their sites.

 aka we appear to have added compatibility code to fix future potential
 bugs at the expense of making something else impossible that someone might
 want to do in future.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36819#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list