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
return$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET `menu_order`=`menu_order`+(%d) WHERE `menu_order`>=%d AND ID IN (SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id=%d) AND ID<>%d", (int) $increment, (int) $min_position, (int) $menu_id, (int) $ignore_item_id ) );
750
750
}
751
751
752
-
/**
753
-
* Move a range of items in one nav_menu up or down by incrementing/decrementing their menu_order field.
754
-
* Only affects items with menu_order between min_position and max_position (inclusive).
755
-
*
756
-
* @param int $menu_id ID of the nav_menu
757
-
* @param int $min_position minimal menu_order to touch (inclusive)
758
-
* @param int $max_position maximal menu_order to touch (inclusive)
759
-
* @param int $increment how much to change menu_order: +1 to move down, -1 to move up
760
-
* @return int|false number of rows affected, or false on failure
return$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET `menu_order`=`menu_order`+(%d) WHERE `menu_order` BETWEEN %d AND %d AND ID IN (SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id=%d)", (int) $increment, (int) $min_position, (int) $max_position, (int) $menu_id ) );
0 commit comments