WordPress 3.1 Admin Bar

A few minutes ago, a first version of the announced admin bar can be found in the current trunk. This feature will be included in WordPress 3.1. The admin bar can be accessed from the backend and the frontend as well.

WordPress 3.1 Admin Bar

Currently beta! It is possible to remove this bar with the following action- and filter-hooks.

remove_action( 'init', 'wp_admin_bar_init' );
foreach ( array( 'wp_footer', 'wp_admin_bar_render' ) as $filter ) 
	add_action( $filter, 'wp_admin_bar_render', 1000 );
remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_me_separator', 10 );
remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_account_menu', 20 );
remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_blogs_menu', 30 );
remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_blog_separator', 40 );
remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_bloginfo_menu', 50 );
remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_edit_menu', 100 );
remove_action( 'wp_head', 'wp_admin_bar_css' );
remove_action( 'admin_head', 'wp_admin_bar_css' );
remove_action( 'wp_footer', 'wp_admin_bar_js' );
remove_action( 'admin_footer', 'wp_admin_bar_js' );
remove_action( 'wp_ajax_adminbar_render', 'wp_admin_bar_ajax_render' );
remove_filter( 'locale', 'wp_admin_bar_lang' );

Warning: This is a very early beta! The admin bar has errors and surely will be updated soon!






15 responses to “WordPress 3.1 Admin Bar”

  1. Andrew Nacin Avatar

    General warnings: Things will be broken. Things will change, potentially drastically. No decisions have been made yet for options, defaults, and the like. Objects in mirror are closer than they appear. Etc.

  2. Tomáš Kapler Avatar

    For a long time we have our own one. But not the general links, but links to current page e.g.
    on page: edit page, create subpage
    on category/taxonomy: edit taxonomy
    on post: edit post
    It is big time saver.

  3. Tom (dB) Avatar

    Will that integrate nicely with the ‘buddybar’. Links to wp-admin if you have the necessary privileges will be a handy feature.

  4. Frank Avatar

    @Andrew: You are right! Currently it has many bugs and I think some changes will be made before the final release since it is still beta. I have updated the post with a warning.

  5. Andrew Nacin Avatar

    I wouldn’t bother with the hooks… Those are likely to disappear or change on a whim. Better to not be using trunk in any kind of production environment (ever) 🙂

  6. Frank Avatar

    Oh yes, i thought to myself 😉
    Current is it very beta and i hope the users see this so.
    Thanks for reading our blog and sharing your knowledge!!!

  7. Jason Avatar

    Since this is the very 1st time i am hearing about this, thanks for the tip off and i will now go take a look. It will give me a heads up for what is on its way at least.

    I initially thought this was a backend option, but the screenshot seems to be front end. For the backend admin i have been using a modified ozh admin bar since i started using WordPress.

  8. […] poboljšanjima u WordPressu 3.1 će se administracija dodatno olakšati. Administratorska letvica (Admin bar) je dodatak kojim se lako pristupa svim administratorskim funkcijama i preko pregleda članka […]

  9. Lars Koudal Avatar

    I wonder what kind of integration options WP plugin developers will have with the admin bar, do you know?

    I can envision several things that I would like to bring to a front-end admin menu.

  10. Frank Avatar

    @Lars: yes, the admin has hooks to include custom functions. But i think it is current to much beta for write about the possibilities.

  11. […] Engineer has a preview of the new WordPress 3.1 admin bar. And Ozh shows how to remove […]

  12. Lars Koudal Avatar

    @Frank: Thanks for the verification. I can wait for the details, I’m getting creative ideas at the moment 🙂

  13. Drew Gourley Avatar
    Drew Gourley

    This is available, just scroll down the page at http://codex.wordpress.org/Version_3.1 under themes…

    Allow turning off the admin bar via no_admin_bar() function, or show_admin_bar filter.

    Much easier.

  14. Marco Rodrigues Avatar

    How about to turn it off by default ? This is annoying..

  15. David Gwyer Avatar

    I have written a Plugin to minimise the admin bar so you don’t have to disable it completely. That way you get the best of both worlds!