Separate update/create menu logic so new menus have name created properly. see #11817
git-svn-id: https://develop.svn.wordpress.org/trunk@13732 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a62734b401
commit
a28e43fa7f
@ -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
Block a user