I found “Network” is one of the parameters that can be used in a plugin’s header file.
So Network: true
in the plugin’s header will cause the plugin to activate on every site in the network. Just learned that.
Further,Network: true
will keep the plugin visible only to Super Administrators.
http://codex.wordpress.org/File_Header
Doesn’t appear to be any code in the plugin api to move a downloaded plugin to the mu-plugins folder, or “drop-in” folder.
I have a Network: true
plugin in a non-network single WP3 and it doesn’t show up in the plugins list either. However, the Plugin Editor still loads the plugin for editing.
Still, do I, or should I need a snip of code to detect if the plugin is not in the mu-plugins folder, and pop up an admin notice or something.
Anyone? Anyone? Bueller?
Are you asking as a Theme Developer or as a Site Runner?
To the latter:
Is there a way to prevent a plugin that must be installed in “mu-plugins” from being downloaded in the “Add New Plugins” page in the site’s backend?
No. Sorry. Sucks, but it has to go manually. Though that said, it’s generally BETTER to go manual for those, as the install is a little different sometimes.
@ipstenu he’s asking as a plugin dev 😉
@dsader a warning is probably a good way to go. I know with buddypress, at one point, the theme moved itself to the theme folder, so it *can* be done. But I think for user education & awareness, plus useability, they shoudl et a message. even if you choose to move it for them.
Thanks, Andrea_r do you have a plugin with a good snip of code that has such a detect/warn/move line or 2?