[wp-trac] [WordPress Trac] #32630: Introduce has_nav_menu filter
WordPress Trac
noreply at wordpress.org
Fri Jun 12 23:46:07 UTC 2015
#32630: Introduce has_nav_menu filter
-----------------------------+-----------------
Reporter: westonruter | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 4.3
Component: Menus | Version: 3.0
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32630>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list