Separate update/create menu logic so new menus have name created properly. see #11817

git-svn-id: http://svn.automattic.com/wordpress/trunk@13732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-03-17 16:19:58 +00:00
parent f7f9b2ba71
commit d5296edfad
1 changed files with 1 additions and 4 deletions

View File

@ -86,10 +86,7 @@ switch ( $action ) {
}
unset($add_nav_menu);
}
}
// Update menu name
if ( isset($_POST['menu-name']) ) {
} elseif ( isset($_POST['menu-name']) ) {
$old_nav_menu = get_term( $nav_menu_selected_id, 'nav_menu', ARRAY_A );
$args = array( 'name' => $_POST['menu-name'], 'slug' => null, 'description' => $old_nav_menu['description'], 'parent' => $old_nav_menu['parent'], );
$new_nav_menu = wp_update_term( $nav_menu_selected_id, 'nav_menu', $args );