| @@ -165,8 +165,10 @@ | ||
| 165 | 165 | /** |
| 166 | 166 | * Switches field ID in fields. |
| 167 | 167 | * |
| 168 | 168 | * @since 5.3 |
| 169 | + * @since 6.35 The description column is checked too, so a field id in a description survives a | |
| 170 | + * duplicate or import when the field it points at is created afterwards. | |
| 169 | 171 | * |
| 170 | 172 | * @param int $form_id Form ID. |
| 171 | 173 | * |
| 172 | 174 | * @return void |
| @@ -174,9 +176,9 @@ | ||
| 174 | 176 | private static function switch_field_ids_in_fields( $form_id ) { |
| 175 | 177 | global $wpdb; |
| 176 | 178 | |
| 177 | 179 | // Keys of fields that you want to check to replace field ID. |
| 178 | - $keys = array( 'default_value', 'field_options' ); | |
| 180 | + $keys = array( 'default_value', 'description', 'field_options' ); | |
| 179 | 181 | $sql_cols = 'fi.id'; |
| 180 | 182 | |
| 181 | 183 | foreach ( $keys as $key ) { |
| 182 | 184 | $sql_cols .= ',fi.' . $key; |