//set up load.php inside /wp-content/mu-plugins, then add: require(WPMU_PLUGIN_DIR . '/myplugin/myplugin.php'); //OR –– use below for multiple mu-plugins inside a subdirectory // // Opens the must-use plugins directory $wpmu_plugin_dir = opendir(WPMU_PLUGIN_DIR); // Lists all the entries in this directory while (false !== ($entry = readdir($wpmu_plugin_dir))) { $path = WPMU_PLUGIN_DIR . '/' . $entry; // Is the current entry a subdirectory? if ($entry != '.' && $entry != '..' && is_dir($path)) { // Includes the corresponding plugin require($path . '/' . $entry . '.php'); } } // Closes the directory closedir($wpmu_plugin_dir);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter