Is the new WordPress 3.1 admin bar pluggable and how can I extend it?

Yoast’s plug-in is actually a very good example if all you want to do is add menus. Basically, the admin bar is just an alternate set of links to the same plug-in admin pages you have in the sidebar. To add the top-level SEO menu, Yoast does the following: $wp_admin_bar->add_menu( array( ‘id’ => ‘wpseo-menu’, ‘title’ … Read more

WordPress Admin Bar Overlapping Twitter Bootstrap Navigation [closed]

How to prevent the WordPress admin bar from overlapping with your Twitter Bootstrap navigation bar. In response to: WordPress admin bar overlapping twitter bootstrap navigation Asked by: @TheWebs If you are using Twitter Bootstrap with WordPress and have an issue with the WordPress admin bar overlapping with your navigation bar, you’re probably pretty frustrated with … Read more

How do I add an icon to a new admin bar item?

Full example A quick (mu-)plugin as example: <?php /** Plugin Name: Add Admin Bar Icon */ add_action( ‘admin_bar_menu’, function( \WP_Admin_Bar $bar ) { $bar->add_menu( array( ‘id’ => ‘wpse’, ‘parent’ => null, ‘group’ => null, ‘title’ => __( ‘Example’, ‘some-textdomain’ ), ‘href’ => get_edit_profile_url( get_current_user_id() ), ‘meta’ => array( ‘target’ => ‘_self’, ‘title’ => __( ‘Hello’, … Read more

what is __return_false in filters

WordPress contains built in functions for quickly returning values. They are intended to be used as a quick built in function that returns a common value to a filter hook such as true, false, or an empty array. __return_false — Returns the Boolean value of false. __return_true — Returns the Boolean value of true. __return_empty_array … Read more