WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

$_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.

share|improve this answer
I see thanks. So if I want to add a few paths to "user_can_access list" (as I want to use them for form_actions) how can I go about doing it ? – Prakash Raman Dec 18 '12 at 12:31
Filter 'role_has_cap' or change the capabilities for that menu page globally. We have examples for both on our site. – toscho Dec 18 '12 at 12:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.