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:
Sergey Biryukov 2014-09-07 10:03:06 +00:00
parent 12bffd9665
commit eac7709d6d
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}