Opened 14 years ago
Last modified 4 years ago
#16828 new enhancement
Add filter on initial_meta_boxes for nav menu
Reported by: | aaroncampbell | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | has-patch has-screenshots dev-feedback |
Focuses: | ui | Cc: |
Description
When you create a custom post type with show_in_nav_menus = true
the metabox in Appearance->Menus is hidden to all new users. This is especially annoying for multi-site setups. The issue is in wp_initial_nav_menu_meta_boxes()
where it sets the initial meta boxes:
$initial_meta_boxes = array( 'nav-menu-theme-locations', 'add-custom-links', 'add-page', 'add-category' );
I'd settle for a filter on that, but it seems like a more complete fix would be to add the filter with a default function hooked into it which would add post types with show_in_nav_menus = true
to the list.
Attachments (3)
Change History (22)
#3
@
12 years ago
My bug has just been closed as duplicate from this one.
I came up with a patch similar to the one proposed by layotte but with a more specific name for the hook (because this feature is really specific to nav menus).
#4
@
11 years ago
- Cc frederic.demarle@… added
+1 for this filter as some users don't have the idea to go in the screen options but go directly to the support forum...
#6
@
10 years ago
Wouldn't it make sense for this screen to make use of the already existing default_hidden_meta_boxes filter?
#7
@
7 years ago
- Keywords has-patch has-screenshots ui-feedback added
This threw me off for a bit after registering a custom post type.
IMHO this limitation should be deprecated/removed entirely.
The function was introduced in 3.0 with a new menu editor. The way the meta boxes were displayed at the time quickly lead to a very loooong page, even when there were only core menu items visible. Limiting the number of meta boxes shown made sense.
This is not the case any more. The collapsed accordion does not cause a long page like it used to (subjective, I know), even if the core Tags and Post Formats (?) are not filtered out.
It does however cause the need to document/support "How do I add menu items for custom post types registered by [insert plugin name]??".
Then:
Now:
#10
@
7 years ago
+1 for deprecating it. As @Chouby pointed:
some users don't have the idea to go in the screen options but go directly to the support forum...
This ticket was mentioned in Slack in #core by whitneyyadrich. View the logs.
6 years ago
This ticket was mentioned in Slack in #design by karmatosed. View the logs.
5 years ago
#16
@
5 years ago
This came up in design triage today and for the design team to know if this does indeed need our feedback, could we have some screenshots and more information please?
#17
@
5 years ago
@karmatosed the initial premise for this ticket was to enable developers to filter which meta boxes are shown in the navigation menu admin page (by default only a core set are visible). I proposed to remove that functionality completely, and show all registered meta boxes because I think the original reason to hide them became moot with the current admin layout (See: https://core.trac.wordpress.org/ticket/16828#comment:7)
These screenshots illustrating the old and new situation are still available here:
Then:
https://cobbledco.de/wp-content/uploads/2017/09/super-long-menu-edit-wp30.png
Now:
http://cobbledco.de/wp-content/uploads/2017/09/super-short-menu-edit-wp48.png
Working on a plugin now that is running into a similar issue. For first-time users of the nav-menu who have our custom nav menu activated, it will not appear on the nav menu screen (unless they select it). We should be able to set our nav menus as visible by default upon viewing the nav-menus.php page initially.