As a developer of WordPress plugins, it’s safe to say that my Admin bar is FULL of super useful items added by plugins that help me develop more efficiently. That being said, it’s also full of a bunch of ‘junk’ that just isn’t needed in my local environment most of the time. Case in point, the ‘Updates’ icon and the ‘Comments’ icon.

Screen Shot 2015-10-27 at 10.16.02 AM

In addition to all the default items that show up in a Network Install I’ve got items added by Query Monitor, Airplane Mode, Debug Bar, Plugin Toggle, and my own Blog ID item.

My main machine is a Macbook Air 11″ and from time to time, I disconnect from the monitors and work on the single screen, and with that many items, it get’s a little crowded. So here’s what I’ve dropped into my own MU plugin to help clean up the interface a bit:

function kfg_remove_admin_bar_items( $wp_admin_bar ) {
	$wp_admin_bar->remove_node( 'wp-logo' );
	$wp_admin_bar->remove_node( 'updates' );
	$wp_admin_bar->remove_node( 'comments' );
add_action( 'admin_bar_menu', 'kfg_remove_admin_bar_items', PHP_INT_MAX, 1 );

With this, I get the following view:

Screen Shot 2015-10-27 at 10.20.53 AM

This both cleans up some of the unnecessary items. The reason for getting rid of the ‘updates’ notifications is I work mostly off Git branches, which sometimes I’m installing a version that isn’t latest on the repository for testing purposes.

Anyway, I hope that helps some devs out in getting rid of items they don’t want to see in their development environment. You can read more about the `remove_node` method on the WordPress Codex.


Posted by Chris Klosowski

Chris Klosowski is the President of Easy Digital Downloads, the easiest way to sell your digital products with WordPress. Trusted by over 50,000 smart store owners.