has_nav_menu WordPress Filter Hook
The has_nav_menu WordPress hook is used to determine whether a given location has a registered menu. This is useful for determining whether to display a particular menu in a given location.
apply_filters( 'has_nav_menu', bool $has_nav_menu , string $location ) #
Filters whether a nav menu is assigned to the specified location.
Parameters
- $has_nav_menu
(bool)Whether there is a menu assigned to a location.
- $location
(string)Menu location.
Source
File: wp-includes/nav-menu.php
Changelog
Version | Description |
---|---|
4.3.0 | Introduced. |