Better structure for admin menu — at Version 52
|Reported by:||scribu||Owned by:|
Description (last modified by scribu)
Currently, the global $menu variable is one big linear array:
$menu = array(  => array('Dashboard', ...  => array('', 'read', 'separator1', ...),  => array('Posts', ...) ... )
To allow plugins to add a menu item at the end of a group, we use a bunch of additional global variables that remember the last element in each group.
Also, we use arbitrary numeric indexes to specify the order of the items, instead of being able to position items relative to one another.
It's all very low level. Things would be a lot easier if we had an actual API for manipulating the menu items.
Change History (55)
comment:35 scribu — 4 years ago
- Milestone 3.1 deleted
- Resolution set to wontfix
- Status changed from assigned to closed
comment:46 scribu — 21 months ago
- Milestone set to Awaiting Review
- Resolution fixed deleted
- Status changed from closed to reopened
comment:49 scribu — 21 months ago
- Cc duck_ added
- Keywords has-patch dev-feedback added
- Milestone changed from Awaiting Review to 3.5
comment:52 scribu — 21 months ago
- Description modified (diff)
- Summary changed from Better structure for admin $menu to Better structure for admin menu