[wp-trac] [WordPress Trac] #16342: Administration Menu management abstraction
WordPress Trac
wp-trac at lists.automattic.com
Sun Jan 30 22:46:25 UTC 2011
#16342: Administration Menu management abstraction
-----------------------------+------------------------------
Reporter: jltallon | Owner:
Type: feature request | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: UI | Version:
Severity: minor | Resolution:
Keywords: |
-----------------------------+------------------------------
Comment (by jltallon):
Indeed this has proven to be a major effort: not only would we need to
replace the menu management internals, but also patch all the
drawing/client code (got a quite complete list of these already)
I'm going to send a draft API first (hopefully tomorrow/in a couple days),
since I don't really have that much time to spare --- I can't afford
coding everything and then having the code thrown away :(
@nacin: can I assume that, even though the codex says to
"print_r($GLOBALS['menu'])" in order to see the positions, the menu API is
essentially private and can be modified??
It really is a major hassle to keep compatibility with plugins mucking up
with the $menu / $submenu globals while changing the internals this much.
If, as I believe, allowing "Admin Themes" is a long-term goal (WP 4
maybe?), this might be a first step in the right direction.
My proposal so far includes the blocks:
- Menu "manager" (including the main API)
- Menu class ("top-level menu")
- MenuItem class ("submenu")
- compatibility wrappers ( add_menu_page, add_submenu_page, etc)
- Menu "renderer" (à la category walkers)
Does this sound acceptable to you all ?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16342#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list