Two little interesting tidbits about WordPress: must-use (mu) plugins and drop-ins. Do you know them?
Must use plugins
Must-use or “mu” plugins are plugins that are loaded automatically regardless of how anything else is configured. They don’t even need the usual plugin headers, just PHP works fine. mu plugins must be placed in the directory:
/wp-content/mu-plugins/. Note that two constants are available:
The other interesting thing about WordPress is the “drop in”. Drop-ins are used to add or replace default WordPress functionality. So for example, if a file named
db.php exists in the
/wp-content/ directory, it will be processed as a custom database class. All drop-in files are placed in the
wp-content directory by default. To use a different directory you may specify it using the
Drop-ins are a scattered lot of useful scripts for a variety of tasks:
|File||Type of Plugin||Loaded||Context|
|advanced-cache.php||Advanced caching plugin.||on
|db.php||Custom database class||always||Single|
|db-error.php||Custom database error message||on error||Single|
|install.php||Custom install script||on install||Single|
|maintenance.php||Custom maintenance message||on maintenance||Single|
|object-cache.php||External object cache||always||Single|
|sunrise.php||‘Executed before Multisite is loaded||on
|blog-deleted.php||Custom blog deleted message||on deleted blog||Multi|
|blog-inactive.php||Custom blog inactive message||on inactive blog||Multi|
|blog-suspended.php||Custom blog suspended message||on archived or spammed blog||Multi|
Source: Data taken from global function
wp-admin/includes/plugin.php. Table data grabbed from here.
Like our new Facebook Page to show support!