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:

<?php
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 WordPress.org 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.

Cheers.

Posted by Chris Klosowski

Chris Klosowski is the Director of Technology at Sandhills Development, LLC, creators of fine WordPress plugins, and ecommerce solutions.

25 Comments

  1. It’s a shame you don’t have a donate button! I’d definitely
    donate to this outstanding blog! I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account.
    I look forward to new updates and will talk about this website with my Facebook group.
    Talk soon!

    Reply

  2. Wow, that’s what I was searching for, what a information! existing here at
    this website, thanks admin of this site.

    Reply

  3. buying viagra online without prescription generic viagra free shipping brijezo – viagra with dapoxetine online

    Reply

  4. is viagra otc does generic viagra work ovcwkiz – viagra online 365

    Reply

  5. buy prednisone 10mg buy prednisone – buying prednisone on line

    Reply

  6. ordering prednisone buy prednisone – how can i get prednisone

    Reply

  7. fast shipping prednisone prednisone online – prednisone 20mg tablets where to buy

    Reply

  8. ivermectin generic name stromectol ivermectin for humans – where to buy ivermectin

    Reply

  9. stromectol how much it cost generic stromectol – stromectol covid 19

    Reply

  10. ivermectin where to buy for humans ivermectin pills for humans – ivermectin 1 cream 45gm

    Reply

  11. ivermectin 50 stromectol tablets – ivermectin price usa

    Reply

  12. which ed drug is best prescription drugs without prior prescription – tadalafil without a doctor’s prescription

    Reply

  13. ed pills that work online drug store – ed causes and cures

    Reply

  14. You said it nicely..
    essay writing
    essay writing http://www.dogusannakliyat.com/

    Reply

  15. top rated ed pills generic ed pills – best treatment for ed

    Reply

  16. ed natural treatment prescription drugs without prior prescription – how to cure ed naturally

    Reply

  17. plaquenil coupon hydroxychloroquine – plaquenil eye exam

    Reply

  18. average cost of plaquenil plaquenil for sale canada – generic for plaquenil

    Reply

  19. generic lipitor drugs lipitor online pharmacy – lipitor without prescription

    Reply

  20. hydroxychloroquine tablets ip 400 mg buy plaquenil – drug cost for plaquenil

    Reply

  21. cialis pills australia cialis pills – brand name cialis online

    Reply

  22. buy cialis 20mg cialis no prescription canada – buy cialis no prescription

    Reply

  23. Great blog here! Also your website loads up very fast! What host are you using?
    Can I get your affiliate link to your host? I wish my site loaded up as fast
    as yours lol

    Reply

Leave a reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.