#14755 closed defect (bug) (maybelater)
more than 5 custom post types screws up menu_position parameter
Reported by: | stunnaboi | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.0.1 |
Component: | General | Keywords: | menu_position, custom post types |
Focuses: | Cc: |
Description
On a personal 3.01 install I have 7 custom post types registered and notice that the 5th and 7th fall below the Comments menu item. It was pointed out to me on the wp-testers email list that the menu is probably constructed as an indexed array. Pages is #20, Comments is #25, so these extra post types get assigned the 2 free indices after 25: 26 & 27, which puts them below Comments. Not a huge deal, but restricts neat organization in the admin on highly customized sites.
Change History (6)
#2
follow-up:
↓ 3
@
14 years ago
- Milestone Awaiting Review deleted
- Resolution set to maybelater
- Status changed from new to closed
Sorry, we're not going to be changing how this works. You'll need to manually modify the positioning of the Comments menu item if necessary.
#3
in reply to:
↑ 2
;
follow-up:
↓ 6
@
14 years ago
Replying to nacin:
Sorry, we're not going to be changing how this works. You'll need to manually modify the positioning of the Comments menu item if necessary.
I noticed how the admin menus are organized that way long time ago. I'm just curious about why that structure is chosen and what are the benefits. Could you give me a hint?
#5
@
14 years ago
Wrote a small fix for one of my projects, that gives us a little more Space. Kind of dirty, but maybe some of you may find it useful. So feel free to grab...
function antwortzeit_move_media () { global $menu; $menu[14] = $menu[10]; unset($menu[10]); } add_action('admin_menu', 'antwortzeit_move_media');
#6
in reply to:
↑ 3
@
14 years ago
Replying to garyc40:
I noticed how the admin menus are organized that way long time ago. I'm just curious about why that structure is chosen and what are the benefits. Could you give me a hint?
Backwards compatibility. We have an API function for removing menus now, so maybe once that has soaked a bit, we can start deprecating direct access hacks and space out the default menus a bunch more so there is a lot more space between each of them.
Related: #12718 and #14666