Skip to content

Commit b97025a

Browse files
petruchekschlessera
authored andcommitted
do not reorder_items after adding new item w/o position specified
1 parent 2882238 commit b97025a

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)