New Plugin Announcement – MU Plugins Tool
-
I’ve created a plugin called MU Plugins Tool, which allows you to selectively enable/disable any MU (must-use) plugins you have installed. For those who don’t know what a MU plugin is, here it is in a nutshell. It’s a PHP file that is executed by WordPress just like a regular plugin, but isn’t installed like a normal plugin. You simply copy a file with your PHP code to the
mu-plugins
folder (default[Your_Wordpress_Root]/wp-content/mu-plugins
) and it’s automatically run. More info in the Codex.So, if you’ve ever seen a tutorial that says “copy
<?php //some php code ?>
to your functions.php file”, instead of doing that you can put it in it’s own separate file and upload it to your MU plugins folder. This is better than messing with a theme’s functions.php and then losing your functionality when changing themes.There are many snippets of code out there that come in handy, such as
// Hides Admin Bar (Toolbar) from front-end - Affects admins and non-admins alike add_filter('show_admin_bar', function(){return false;});
and
// Hides the WordPress new version update nag from your admin add_action('admin_menu','wphidenag'); function wphidenag() { remove_action( 'admin_notices', 'update_nag', 3 ); }
The second code block is only recommended for those who plan to update soon, but just not right this minute, and are tired of seeing the nag. The way most sites would say to use these would be to include them in your functions.php of your theme. MU plugins are much better suited for such functionality.
MU Plugins Tool simplifies the process by giving you an easy way to enable/disable the MU plugins you’ve installed. Some near-future functionality I plan on implementing is the ability to create/edit/delete MU plugins right from the interface, as well as uploading files to the mu-plugins folder from your computer.
Any and all feedback, criticisms, feature-requests, etc. are welcome.
- The topic ‘New Plugin Announcement – MU Plugins Tool’ is closed to new replies.