[wp-trac] [WordPress Trac] #12718: Better structure for admin menu
WordPress Trac
noreply at wordpress.org
Sat Dec 29 07:58:07 UTC 2012
#12718: Better structure for admin menu
------------------------------------+-----------------------------
Reporter: scribu | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: Future Release
Component: Plugins | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+-----------------------------
Comment (by nacin):
#22895 highlights why the admin menu code needs more than just an API
rewrite. Important functions like user_can_access_admin_page() still rely
on grotesque globals like $_wp_submenu_nopriv.
Mind you, this admin menu code isn't just building a menu, it also
controls page rendering, and importantly, privilege checking to determine
access. But, this lower-level code is completely unmaintainable spaghetti,
and should be a target in an overhaul. We should really aim to start
fresh. That's especially since the current API proposal might get
modified/adapted based on what we learn from the lower-level bits.
When reviewing the patch, I was surprised there is nothing involving
WP_Screen. Or perhaps this is not unexpected considering this currently
just deals with a better structure for the menu itself. But any rewrite
that goes further down the rabbit hole should probably bring WP_Screen
into the mix.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12718#comment:79>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list