This snippet shows you how to add custom admin pages to WordPress without adding them to the menu, this is useful for plugins that have sub-pages that aren't directly accessible (e.g. an editing page).
Adding pages to the menu or sub menus in WordPress (add_menu_page, add_submenu_page), will append the page to the list of accessible sections in the admin area. Without this you'll likely see the following error:
"You do not have sufficient permissions to access this page."
Overcoming this is a little backward, but the easiest solution is to add to a sub menu but set the parent as null (thus it doesn't attach itself to any part of the menu, but is added to the list of accessible pages).
Here's an example: