Use get_registered_nav_menus() in has_nav_menu().
props voldemortensen. fixes #29461. git-svn-id: https://develop.svn.wordpress.org/trunk@29717 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
12bffd9665
commit
eac7709d6d
|
@ -142,9 +142,8 @@ function get_nav_menu_locations() {
|
||||||
* @return bool Whether location has a menu.
|
* @return bool Whether location has a menu.
|
||||||
*/
|
*/
|
||||||
function has_nav_menu( $location ) {
|
function has_nav_menu( $location ) {
|
||||||
global $_wp_registered_nav_menus;
|
$registered_nav_menus = get_registered_nav_menus();
|
||||||
|
if ( ! isset( $registered_nav_menus[ $location ] ) ) {
|
||||||
if ( ! isset( $_wp_registered_nav_menus[ $location ] ) ) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue