From 4f5e1941545bf56a4d7d0fa7e6a1a426a617e783 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 9 Apr 2013 20:50:45 +0000 Subject: [PATCH] Use correct variable. fixes #24014. see #23119. git-svn-id: https://develop.svn.wordpress.org/trunk@23941 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/nav-menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index 0aba063884..5157f07e7b 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -192,7 +192,7 @@ function wp_delete_nav_menu( $menu ) { // Remove this menu from any locations. $locations = get_theme_mod( 'nav_menu_locations' ); foreach ( (array) $locations as $location => $menu_id ) { - if ( $menu_id == $nav_menu_id ) + if ( $menu_id == $menu->term_id ) $locations[ $location ] = 0; } set_theme_mod( 'nav_menu_locations', $locations );