Project

General

Profile

Actions

Bug #4799

closed

Critical plugins for the main Commons site should be loaded programatically

Added by Boone Gorges about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress Plugins
Target version:
Start date:
2015-10-19
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

During a recent Commons upgrade, I wrote a script that accidentally deactivated a bunch of stuff on the main Commons site. This was an extreme example of something going wrong, but it points toward a more general problem that it's possible to deactivate critical functionality on the main site, through the wp-admin/plugins.php interface.

We should load our critical libraries in such a way that they cannot be deactivated. The most straightforward way to do this is in an mu-plugin, which bootstraps each relevant plugin directly. (We could then add these plugins manually to the 'active_plugins' array, so that they show up in the plugins.php list, though this is not strictly necessary.)

Ray, have you done this before? Anything to watch out for? Loading from mu-plugins will mean that items are loaded in a somewhat different order than they currently are - by muplugins_loaded rather than plugins_loaded - though this could be mitigated by putting everything inside of a 'plugins_loaded' callback in the mu-plugin.

Actions

Also available in: Atom PDF