[wp-hackers] WPMU mu-plugins dir (was Setting default options for plugin)

Omry Yadan omry at yadan.net
Tue Sep 4 08:14:23 GMT 2007


Jeremy Visser wrote:

> WordPress MU needs something similar. 'mu-plugins' never get their
> activation/deactivation hooks called, because there is no concept of
> activating or deactivating mu-plugins (you just add/delete the .php
> files from the mu-plugins directory). All it does is run include() on
> wp-content/mu-plugins/*.php.
>
> Some plugins (particularly those that add DB tables) break with the lack
> of these hooks, and I would like to see WordPress MU work differently in
> that area.
>   
I agree.
mu-plugins seems like nothing more than an auto-include directory. if 
it's really a plugins directory it should follow the same conventions 
(and should use the same code WP uses to activate them).

I noticed missing from current mu-plugins functionality:
1. plugins in directories are ignored.
2. no activation/deactivation functionality, which means plugins that 
need to have some first time setup can't easily be fit there.

the common wisdom is that mu-plugins is for plugins that users may not 
deactivate. this is fine, and a good functioanlity for wpmu - but not at 
the cost of incompatibility with existing plugins:
the mare fact that a plugin may not be deactivated by a user does not 
imply in any way that it may not be deactivated by the admin, or that it 
must not rely on a one time activation sequence.
I think wpmu should have a "System plugins" page, with the same 
functionality as the plugins page (activate/deactivate), that will only 
be accessible to the site admin.


I understand that this probably means some work on the core wordpres 
files, to allow the code that handle the plugins initialization to work 
for mu-plugins as well, but I think it's worth it.

    Omry.



More information about the wp-hackers mailing list