[wp-trac] [WordPress Trac] #37707: Change the inclusion of 'plugins.php' to require_once

WordPress Trac noreply at wordpress.org
Mon Sep 12 01:49:48 UTC 2016


#37707: Change the inclusion of 'plugins.php' to require_once
----------------------------+---------------------
 Reporter:  jorbin          |       Owner:  jorbin
     Type:  enhancement     |      Status:  closed
 Priority:  normal          |   Milestone:  4.7
Component:  Bootstrap/Load  |     Version:
 Severity:  normal          |  Resolution:  fixed
 Keywords:                  |     Focuses:
----------------------------+---------------------
Changes (by pento):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"38589"]:
 {{{
 #!CommitTicketReference repository="" revision="38589"
 Bootstrap: Use `dirname()` when loading `class-wp-hook.php` from
 `plugin.php`.

 To allow `plugin.php` to be loaded before the rest of WordPress is loaded,
 it cannot rely on WordPress constants, such as `ABSPATH` and `WPINC`.

 Instead, we can assume that `class-wp-hook.php` will be in the same
 directory as `plugin.php`, so `dirname( __FILE__ )` will give us the
 correct path to load from.

 Props pento, dd32.
 Fixes #37707.
 }}}

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


More information about the wp-trac mailing list