WordPress开发者和主题制作者的搜索引擎



has_nav_menu ›

Since4.3.0
已弃用n/a
apply_filters( 'has_nav_menu', $has_nav_menu, $location )
参数: (2)
  • (bool) $has_nav_menu Whether there is a menu assigned to a location.
    Required: Yes
  • (string) $location Menu location.
    Required: Yes
定义在:
文档:

Filters whether a nav menu is assigned to the specified location.





源码

return apply_filters( 'has_nav_menu', $has_nav_menu, $location );