From f84cbb4ba85066ee257bd338331ff834100c72b8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 7 Sep 2014 10:04:16 +0000 Subject: [PATCH] Use get_registered_nav_menus() in has_nav_menu(). props voldemortensen. fixes #29461. Built from https://develop.svn.wordpress.org/trunk@29717 git-svn-id: http://core.svn.wordpress.org/trunk@29491 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/nav-menu.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index 782ecca89c..8a0ee77a4d 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -142,9 +142,8 @@ function get_nav_menu_locations() { * @return bool Whether location has a menu. */ function has_nav_menu( $location ) { - global $_wp_registered_nav_menus; - - if ( ! isset( $_wp_registered_nav_menus[ $location ] ) ) { + $registered_nav_menus = get_registered_nav_menus(); + if ( ! isset( $registered_nav_menus[ $location ] ) ) { return false; }