#26900 closed defect (bug) (fixed)
unregister_nav_menu() should remove_theme_support()
Reported by: | kovshenin | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Menus | Keywords: | has-patch |
Focuses: | Cc: |
Description
I thought about this when reading through #26276. When a child theme (or a plugin) unregisters all menu items, current_theme_supports
still returns true for menus, which can cause certain weirdness with the UI:
- If widgets are not supported, the Menus menu is still visible
- The "your theme has no menus but you can use a widget" text is not displayed on the Menus screen
- The "Theme locations" label is visible on the Menus screen but the list is empty
Since register_nav_menu()
adds theme support, I think unregister_nav_menu()
should remove it.
Attachments (1)
Change History (8)
#2
follow-up:
↓ 3
@
11 years ago
Shouldn't users still be able to create custom menus and add them via widgets even if the theme does not explicitly support menus?
#3
in reply to:
↑ 2
;
follow-up:
↓ 4
@
11 years ago
Replying to mordauk: Sure. If widgets are supported by the theme, the menus UI will be shown regardless of navigation menu support.
Note: See
TracTickets for help on using
tickets.
26900.diff removes theme support during unregister_nav_menu() + unit tests.