WordPress.org

Make WordPress Core

Ticket #14001: nav-menu.php.15288.patch

File nav-menu.php.15288.patch, 702 bytes (added by jorbin, 10 years ago)
  • wp-includes/nav-menu.php

     
    7878        $_wp_registered_nav_menus = array_merge( (array) $_wp_registered_nav_menus, $locations );
    7979}
    8080
     81
    8182/**
     83 * Unregisters a navigation menu for a theme.
     84 *
     85 * @param array $location the menu location identifier
     86 */
     87function unregister_nav_menu( $location ) {
     88        global $_wp_registered_nav_menus;
     89
     90        if (array_key_exists( $location, $_wp_registered_nav_menus ) )
     91                unset( $_wp_registered_nav_menus[$location] );
     92}
     93
     94
     95
     96/**
    8297 * Register a navigation menu for a theme.
    8398 *
    8499 * @since 3.0.0