[wp-trac] [WordPress Trac] #16204: Add hooks to enable access to pages in the admin when the menu layout has been changed by plugin
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 12 16:31:33 UTC 2011
#16204: Add hooks to enable access to pages in the admin when the menu layout has
been changed by plugin
----------------------------+-----------------------------
Reporter: mikeschinkel | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.1
Severity: normal | Keywords: has-patch
----------------------------+-----------------------------
This patch and ticket is a follow on to tickets #16048 and #16050 and
indirectly related to this discussion on hackers:
http://lists.automattic.com/pipermail/wp-hackers/2011-January/037129.html
This patch simply adds the following hooks, all within /wp-
admin/includes/plugin.php.
- menu_page_url
- admin_page_parent
- admin_page_title
- plugin_page_hookname
- user_can_access_admin_page
The patch does not attempt to unravel the many early exits of the various
functions instead it simply redundantly adds the hooks at each exit point.
As such it's backward compatibility can be reviewed simply by viewing the
code.
The use-case for this patch is when the menus are not exactly in the
format expected by WordPress (but instead desired by the client) it can
sometimes take hours of trial and error to get the permissions to allow
users access to the menus they should be allowed access to.
For example, if the first submenu page for a menu page is removed from the
menu, even when it makes logical sense to the user WordPress currently
does not allow that menu option to be viewed. These hooks would give
plugin developers the ability to modify the menus and still enable users
access to the pages they need access to.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16204>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list