#21576 closed enhancement (fixed)
wp_nav_menu: Don't return markup, when no menu item is set
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | has-patch |
Focuses: | Cc: |
Description
Having assigned an empty menu to a location can be assumed to be the user's way of "disabling" the menu.
When there are no items, there shouldn't be a menu, hence there shouldn't be any extra menu markup.
Rendering markup nonetheless could lead to issues when menu wrappers are styled (as they are in Twenty Twelve) and left empty.
Currently out put is:
<div class="menu-menu-container"><ul id="menu-menu" class="menu"></ul></div>
Related: #21562
Attachments (1)
Change History (7)
Note: See
TracTickets for help on using
tickets.
I can get behind this.