Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#28700 closed enhancement (duplicate)

remove_submenu_page() Prevents Access

Reported by: webtechglobal's profile WebTechGlobal Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.9.1
Component: Administration Keywords:
Focuses: ui, administration Cc:


remove_submenu_page codex page seems to suggest that this function will not prevent access to the page...

"this would not prevent a user from accessing these screens directly".

However it does and "You do not have sufficient permissions to access this page." is displayed.

Has the functions purpose changed or has an update possibly neglected this function and it's need? There are various posts on forums suggesting the function does actually hide items rather than remove pages so it seems it's behavior has changed.

I'm thinking being security related this function should be left alone and a new hide_submenu_page() function created.

I'm trying to register around 30 pages, show 5 in the plugin menu and the other 25 in tabbed menus on each of the 5 pages. It cannot be done while remove_submenu_page() does not hide and actually removes the page from array.

Change History (3)

#1 @WebTechGlobal
9 years ago

  • Severity changed from normal to minor

#2 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #18850, #20878, #21424, #25591.

#3 @jdgrimes
9 years ago

@WebTechGlobal — I've updated the codex page to clarify things.

Note: See TracTickets for help on using tickets.