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

WordPress Trac noreply at wordpress.org
Mon Aug 8 12:32:37 UTC 2016


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

 * keywords:  has-patch 2nd-opinion needs-unit-tests => has-patch 2nd-
     opinion commit


Comment:

 Upon re-reading my previous comment, I realised I probably need to clarify
 the state of things.

 * Trunk: All tests pass.
 * Trunk + [attachment:17817.11.diff:ticket:17817 17817.11.diff]: Hook
 tests fail, because `_restore_plugin_globals()` treats the content of each
 value in `$wp_filter` as an array. `WP_Hook` implements `ArrayAccess`, so
 happily complies, not realising it's about to be overwritten by an actual
 array.
 * Trunk + [attachment:36819.6.diff] +
 [attachment:17817.11.diff:ticket:17817 17817.11.diff]: All hook tests
 pass, there are some other tests that fail, but they're not relevant to
 this code, and can be fixed as part of #17817.

 My concern with these functions is that they're pretty hacky, but I don't
 think we're going to be able to do much better, due to how it has to wrap
 around cache drop-ins. The best outcome is a patch we can apply now, then
 we will never speak of this code again.

 With that in mind, I think [attachment:36819.6.diff]  is ready for commit.
 @jorbin, could you please review, and add any other thoughts?

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


More information about the wp-trac mailing list