#32630 closed feature request (fixed)
Introduce has_nav_menu filter
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.3 | Priority: | normal |
| Severity: | normal | Version: | 3.0 |
| Component: | Menus | Keywords: | has-patch |
| Focuses: | Cc: |
Description
For Menu Customizer (#32576) to preview changes with partial refresh, we need to know which menu locations are used on a given template. In Twenty Fifteen, the wp_nav_menu calls are wrapped in a has_hav_menu() checks, meaning that the hooks that fire in wp_nav_menu will not be triggered if there was no menu assigned to the location up-front. So in the same way that we have a is_sidebar_active() function and a corresponding is_active_sidebar filter, we also should have a has_nav_menu filter accompany the has_hav_menu() function.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Source: https://github.com/xwp/wordpress-develop/pull/91/files#diff-8ffabe2d2470a815389fd77c045d2c7fL148