Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
Created January 2, 2013 17:08
Show Gist options
  • Save WebEndevSnippets/4436171 to your computer and use it in GitHub Desktop.
Save WebEndevSnippets/4436171 to your computer and use it in GitHub Desktop.
WordPress: Add Admin Toolbar Menu Items
add_action( 'admin_bar_menu', 'we_add_admin_bar_links', 100 );
/**
* Add Admin Toolbar Menu Items
*
*/
function we_add_admin_bar_links($admin_bar) {
$admin_bar->add_menu( array(
'id' => 'google-analytics',
'title' => 'Google Analytics',
'href' => 'http://www.google.com/analytics/',
'meta' => array(
'title' => __('Google Analytics'),
),
));
$admin_bar->add_menu( array(
'id' => 'webendev',
'title' => 'WebEndev',
'href' => 'http://www.webendev.com/',
'meta' => array(
'title' => __('WebEndev'),
'target' => '_blank',
'class' => 'webendev-support'
),
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment