To extend the functionality of WordPress most people have only heard of the use of plugins. Not many people have heard of the term Dropins. WordPress has it's core functionality which can be added to by the use of plugins which take advantage of multiple WordPress hooks and actions, but it also allows you to replace functionality with the use of Dropin files. Unlike a plugin the Dropin file will not need to be activated and will become activate when it is placed in the wp-content folder. This folder will by default be at the root of your WordPress install, but can be defined by changing the constant variable WP_CONTENT_DIR.
// Custom content directory
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/wp-content' );
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content' );
An example of how WordPress will include these Dropin files can be seen in the WordPress core code, here is an example of displaying the maintenance.php as you can see it uses the constant WP_CONTENT_DIR.
if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) {
require_once( WP_CONTENT_DIR . '/maintenance.php' );
die();
}
When you place your Dropin files in the wp-content folder you can see this from the plugin maintenance screen /wp-admin/plugins.php?plugin_status=dropins. To get a list of available dropin's there is a function in /wp-admin/includes/plugin.php called _get_dropins(), this will return the following list of dropin's. ## Single Site Install