original_string: public static function save_order_field( $group_id, $order ) {
      global $wpdb;
  
      if( !is_numeric($group_id) ) {
        return false;
      }
  
      foreach( $order as $key => $value ) {
        $update = $wpdb->update(
          MF_TABLE_CUSTOM_FIELDS,
          array( 'display_order' => $key ),
          array( 'custom_group_id' => $group_id, 'id' => $value ),
          array( '%d' ),
          array( '%d', '%d' )
        );
  
        if( $update  === false ) {
          return $update;
        }
      }
      return true;
    }
code: public static function save_order_field( $group_id, $order ) {
      global $wpdb;
  
      if( !is_numeric($group_id) ) {
        return false;
      }
  
      foreach( $order as $key => $value ) {
        $update = $wpdb->update(
          MF_TABLE_CUSTOM_FIELDS,
          array( 'display_order' => $key ),
          array( 'custom_group_id' => $group_id, 'id' => $value ),
          array( '%d' ),
          array( '%d', '%d' )
        );
  
        if( $update  === false ) {
          return $update;
        }
      }
      return true;
    }
code_tokens: public static function save_order_field ( $ group_id , $ order ) { global $ wpdb ; if ( ! is_numeric ( $ group_id ) ) { return false ; } foreach ( $ order as $ key => $ value ) { $ update = $ wpdb -> update ( MF_TABLE_CUSTOM_FIELDS , array ( 'display_order' => $ key ) , array ( 'custom_group_id' => $ group_id , 'id' => $ value ) , array ( '%d' ) , array ( '%d' , '%d' ) ) ; if ( $ update === false ) { return $ update ; } } return true ; }
docstring: Save the order of the custom fields
docstring_tokens: Save the order of the custom fields