show_in_menu swaps position with custom menu_page
|Reported by:||WraithKenny||Owned by:|
- hook add_menu_page to admin_menu with menu_slug set to 'custom_menu_page' or somesuch
- hook register_post_type to init with show_in_menu set to the above custom menu page.
The post_type page should be a subpage of the custom menu page.
The post type assumes the top level spot, and the menu page ends up as a sub.
This is due to post types being usually being hooked at init (first), while add_menu_page is usually tied to admin_menu (second). The add_submenu_page function (used by the show_in_menu arg) assigns position by order of registration. I can't think of any solution other then allowing ordering of add_submenu_page.