[wp-trac] [WordPress Trac] #24256: Custom Post Types are hidden by default in the nav-menu page and there's no clean way to prevent that
WordPress Trac
noreply at wordpress.org
Fri May 3 08:38:42 UTC 2013
#24256: Custom Post Types are hidden by default in the nav-menu page and there's no
clean way to prevent that
--------------------------+-----------------------------
Reporter: louisremi | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: trunk
Severity: normal | Keywords: needs-patch
--------------------------+-----------------------------
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`.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24256>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list