Tuesday, August 28, 2012

How to easily add shortcuts to WordPress toolbar

As with many things, WordPress makes it easy to customize the Toolbar, using the add_node() functions. In this recipe, I’m going to show you how to add a shortcut to WordPress toolbar.

function custom_toolbar_link($wp_admin_bar) {
$args = array( 'id' => Help,
'title' => 'Help',
'href' => 'http://h20bikash.blogspot.com/',
'meta' => array( 'class' =>Help,
'title' => 'Help' ) );
$wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'custom_toolbar_link', 999);

No comments:

Post a Comment