You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wp widget move --sidebar-id --position puts the widget at the top when the position matches its current index #94
When a widget moves to another sidebar with --position=<n>, it lands at position 1 instead of <n> if <n> is the same as its position in the current sidebar:
Expected archives-1 at position 2, but the list shows:
id position
archives-1 1
search-2 2
Widget_Command::move() sets the new index to the current index when --position is not given, and then resets it to 0 for a move to another sidebar if the new index equals the current index. That check cannot tell "no --position" from "--position that happens to match the current index", so the given position is ignored.
Expected: archives-1 is at position 2 in sidebar-2.
Activity