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

WordPress Trac noreply at wordpress.org
Tue Aug 9 01:44:22 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:
------------------------------------------+------------------------

Comment (by pento):

 In [changeset:"38223"]:
 {{{
 #!CommitTicketReference repository="" revision="38223"
 Boostrap/Load: Improve forward compatiblity of plugin global backup
 methods.

 [37588] added methods to backup the plugin globals, for ensuring that
 advanced cache drop-ins don't overwrite hooks that've been added earlier
 in the load process.

 The method for restoring the plugin globals wasn't compatible with the
 implementation of `WP_Hook` in #17817. `WP_Hook` implements `ArrayAccess`,
 so `_restore_plugin_globals()` was treating it as an array, and
 inadvertantly overwriting the `WP_Hook` object with a plain array.

 To avoid having to re-write this code as part of #17817, we now use
 `add_filter()` to restore any hooks that were added by cache drop-ins,
 which `WP_Hook` correctly supports.

 Props pento, jorbin.
 See #36819.
 }}}

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


More information about the wp-trac mailing list