How to remove items from +New admin menu?

This tutorial is actually taken from an answer I gave on StackOverflow to a question by sailingthoms

Sailingthoms's question


I would like to limit the +New admin menu to only show the single sub menu Event ("Veranstaltung"). Basically the users are allowed to create other items as well but not from that +New menu.

My answer

To hide everything (menu and submenu)-

To hide specific menu/submenu item(s)-

So, the basic rule is-

Add a new menu-

Update an existing menu-

How to get menu ID-
The easiest way is to inspect element with Firebug and take the ID. See this screenshot-

Navigate to your desired menu item and get the string next to wp-admin-bar-