WordPress.org

Make WordPress Core

Changeset 14590


Ignore:
Timestamp:
05/12/2010 09:23:29 PM (8 years ago)
Author:
ryan
Message:

Don't pass a slug when creating anew menu. This prevents creating a menu whose slug matches a different term in another taxonomy. Props filosofo. fixes #13345

File:
1 edited

Legend:

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

    r14586 r14590  
    9292        return new WP_Error( 'menu_exists', sprintf( __('The menu name <strong>%s</strong> conflicts with another menu name. Please try another.'), esc_html( $menu_name ) ) );
    9393
    94     if ( isset($args['slug']) )
    95         $slug = $args['slug'];
    96     else
    97         $slug = $menu_name;
    98 
    99     $menu = wp_insert_term( $menu_name, 'nav_menu', array('slug' => $slug) );
     94    $menu = wp_insert_term( $menu_name, 'nav_menu' );
    10095
    10196    if ( is_wp_error($menu) )
Note: See TracChangeset for help on using the changeset viewer.