Custom Post Types are hidden by default in the nav-menu page and there's no clean way to prevent that
|Reported by:||louisremi||Owned by:|
The function wp_initial_nav_menu_meta_boxes marks all non-built-in meta-boxes as hidden.
This has some unexpected consequences: register_post_type has an option show_in_nav_menus and one would guess that setting this to true would display a meta-box for this post type on the nav-menu UI, but it doesn't.
The real problem is that there is no clean way to prevent that behavior: the only hook available is hidden_meta_boxes and using it to un-hide meta-boxes also overrides screen-options actually selected by the user. (default_hidden_meta_boxes is never executed for nav-menus, because of wp_initial_nav_menu_meta_boxes).
I'm not sure why wp_initial_nav_menu_meta_boxes was written in the first place, but it should at least provide a hook to add additional $initial_meta_boxes.
Change History (8)
- Keywords has-patch added; needs-patch removed
- Type changed from defect (bug) to enhancement
comment:6 SergeyBiryukov — 7 months ago
- Milestone Awaiting Review deleted
- Status changed from new to closed
- Version changed from trunk to 3.0