Use correct variable. fixes #24014. see #23119.

git-svn-id: https://develop.svn.wordpress.org/trunk@23941 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2013-04-09 20:50:45 +00:00
parent 99a0fef80c
commit 4f5e194154

View File

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