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:
parent
f7f9b2ba71
commit
d5296edfad
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue