Skip to content

Commit dc9a903

Browse files
swissspidyCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 5c4a0a2 commit dc9a903

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Menu_Item_Command.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,7 @@ private function add_or_update_item( $method, $type, $args, $assoc_args ) {
587587
$menu_item_obj = wp_setup_nav_menu_item( $menu_item_obj );
588588

589589
// Correct the menu position if this was the first item. See https://core.trac.wordpress.org/ticket/28140
590-
$position = ( 0 === $menu_item_obj->menu_order ) ? 1 : $menu_item_obj->menu_order;
591-
$old_position = $position;
590+
$position = ( 0 === $menu_item_obj->menu_order ) ? 1 : $menu_item_obj->menu_order;
592591

593592
$default_args = [
594593
'position' => $position,

0 commit comments

Comments
 (0)