[wp-trac] [WordPress Trac] #14359: Support loading mu_plugins from subdirectories

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 20 09:35:51 UTC 2010


#14359: Support loading mu_plugins from subdirectories
-------------------------+--------------------------------------------------
 Reporter:  benward      |       Owner:  benward                          
     Type:  enhancement  |      Status:  new                              
 Priority:  normal       |   Milestone:  Awaiting Review                  
Component:  Plugins      |     Version:  3.0                              
 Severity:  normal       |    Keywords:  plugins, mu_plugins, subdirectory
-------------------------+--------------------------------------------------

Comment(by nacin):

 The issue I see is that many use it like so: a directory of scripts, with
 files at the root including what must be loaded that happens to be below
 the top level. This is how any multi-file mu plugin must work currently.

 Changing that without it being an opt-in would obviously break quite a
 bit.

 The ability for files in mu-plugins to be visible in the admin is quite
 new. I wrote the code for it for 3.0; the functionality itself was
 introduced in 2.8 in core, and in MU years before that. Enabling it to
 scan plugin headers is a complete afterthought in the general sense.

 My point is, even if we scanned subdirectories, files not containing
 headers would need to be moved down an additional directory anyway (no
 different from moving a single file up a directory, as it is now) or we
 would need to store valid plugins in the DB, something we've never done
 for these -- mu-plugins are completely stateless. Not only do we make
 headers optional, but they were useless until 3.0.

 Simple solution I see is that you simply move up yahoo_example.php to be
 on the same level as yahoo_example and make sure the php file includes
 what it needs out of the folder. More complex solution, well, I'm not sure
 -- it involves a significant rework of a section that, I think, is best
 kept light and simple so plugins, networks, and Yahoo can build whatever
 their heart desires on top of it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14359#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list