Skip to content

Instantly share code, notes, and snippets.

@tiltos
Created September 10, 2012 04:36
Show Gist options
  • Save tiltos/3688899 to your computer and use it in GitHub Desktop.
Save tiltos/3688899 to your computer and use it in GitHub Desktop.
Remove the "+ New" menu from the Toolbar
<?php
/**
* Remove the "+ New" menu from the Toolbar
*/
function remove_toolbar_new_menu() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('new-content');
$wp_admin_bar->remove_menu('comments');
}
add_action('admin_bar_menu', 'remove_toolbar_new_menu', 300);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment