Skip to content

Commit 824ded6

Browse files
committed
do not reorder_items after adding new item w/o position specified
1 parent 0311008 commit 824ded6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Menu_Item_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ private function add_or_update_item( $method, $type, $args, $assoc_args ) {
486486
}
487487
} else {
488488

489-
if ( 'add' === $method ) {
489+
if ( ( 'add' === $method ) && $menu_item_args['menu-item-position']) {
490490
$this->reorder_menu_items( $menu->term_id, $menu_item_args['menu-item-position'], +1, $result );
491491
}
492492

0 commit comments

Comments
 (0)