[wp-trac] [WordPress Trac] #32845: Introduce wp_include()

WordPress Trac noreply at wordpress.org
Thu Jul 2 19:03:59 UTC 2015


#32845: Introduce wp_include()
-----------------------------+-----------------------
 Reporter:  johnjamesjacoby  |       Owner:
     Type:  feature request  |      Status:  reopened
 Priority:  normal           |   Milestone:
Component:  Plugins          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  close            |     Focuses:
-----------------------------+-----------------------

Comment (by dougal):

 Even though it seems that this will not move forward anyways, I just
 wanted to point out some flaws in the patch, as presented above (in case
 anybody is still thinking of experimenting with the idea):

 The `wp_include()` function was defined in `WPINC/plugins.php`, but the
 patch attempted to use the new function several times before `plugin.php`
 is even loaded.

 Obviously, the function could be moved. But even then, regular plugins
 aren't going to be able to affect a whole lot with it, because they aren't
 loaded until much later. The `sunrise.php` drop-in can do more, but still
 wouldn't be loaded early enough to allow filtering of several of the core
 includes.

 @nacin has already pointed out the reasons why filterable includes are
 probably not a good approach (because it could create more technical debt
 and potential for compatibility breakage).

 A better path forward would probably be to continue to create new filter
 hooks, and where possible, design new/refactored functionality with an eye
 towards interfaces that allow Dependency Injection.

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


More information about the wp-trac mailing list