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

WordPress Trac noreply at wordpress.org
Thu Aug 11 06:50:47 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:32 pento]:
 > Replying to [comment:31 westi]:
 > > It also looks like it makes it impossible for an advanced-cache dropin
 to remove an already registered filter/action hook?
 >
 > You're killing me, @westi.
 >
 > That's correct, advanced-cache dropins can no longer remove a hook that
 was registered earlier in the load process.
 >
 > It's something we could potentially allow for, but it would cause a
 performance hit - rather than skipping an unchanged `$wp_fliter`,
 `_restore_plugin_globals()` would need to compare every entry in
 `$wp_filter` with its backup on every page load.


 I am tempted to say we should just remove the code.

 In part this is because I can't get my head around what bug this fixes.

 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.

 Are we creating work trying to fix a bug that doesn't really "exist" here?

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


More information about the wp-trac mailing list