What does $_registered_pages do?

I would like to know what $_registered_pages does and where am I supposed to use it.


p.s was unable to find any documentation on it online.

Solutions Collecting From Web of "What does $_registered_pages do?"

$_registered_pages is a temporary container for all registered admin menu pages. It is filled in add_menu_page() and add_submenu_page() and used used later in user_can_access_admin_page().

The leading underscore indicates you should not use it for anything. It is private and might change its name any time without warning. So do not use it in your own code, that will break one day.