[wp-hackers] Caching as part of the core

Mike Schinkel mike at newclarity.net
Sun Jul 22 19:54:33 UTC 2012

On Jul 22, 2012, at 1:31 PM, Brian Layman wrote:
> Drop in plugins are what they are because they must be loaded early on, or at least at very specific times in the initiation process, to do their job.
> They are so specific in function, that the list of file names is hard coded into the core.

But clearly the method $dropins use to find and load files could be improved, no?

Consider this as a strawman proposal[1]:

1.) Move the require() in /wp-settings.php for /wp-includes/plugin.php from line 78 to 31 so that it gets loaded before any drop-ins.
2.) On line 32 of /wp-settings.php call a function that looks for a '/wp-content/dropins/' directory; if it exists then include() all the .php files in the directory.
3.) Deprecate existing dropins and implement do_action() hooks to run in place of existing dropins.
4.) Document that any file in dropins directory is responsible to add the actions it needs to support its own drop-in functionality.

Thoughts?  If I don't get someone to explain an obvious reason this won't work I can add to Trac.

[1] http://en.wikipedia.org/wiki/Straw_man_proposal

More information about the wp-hackers mailing list