Make WordPress Core

Changeset 25196


Ignore:
Timestamp:
08/31/2013 01:38:11 AM (11 years ago)
Author:
nacin
Message:

Use get_nav_menu_locations() in wp_delete_nav_menu().

props nofearinc.
see #25064.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu.php

    r25163 r25196  
    191191
    192192    // Remove this menu from any locations.
    193     $locations = get_theme_mod( 'nav_menu_locations' );
    194     foreach ( (array) $locations as $location => $menu_id ) {
     193    $locations = get_nav_menu_locations();
     194    foreach ( $locations as $location => $menu_id ) {
    195195        if ( $menu_id == $menu->term_id )
    196196            $locations[ $location ] = 0;
Note: See TracChangeset for help on using the changeset viewer.