Completed
Pull Request — master (#2266)
by
unknown
47s
created
stripe/controllers/FrmTransLiteActionsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -472,8 +472,8 @@  discard block
 block discarded – undo
472 472
 			return $values;
473 473
 		}
474 474
 
475
-		if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[ $field->id ] ) ) {
476
-			$values['value'] = $previous_entry->metas[ $field->id ];
475
+		if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[$field->id] ) ) {
476
+			$values['value'] = $previous_entry->metas[$field->id];
477 477
 		}
478 478
 
479 479
 		$frm_vars['trans_filled'] = true;
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 			 * @param Closure    $destroy_callback
509 509
 			 * @return void
510 510
 			 */
511
-			function () use ( $entry_id, &$destroy_callback ) {
511
+			function() use ( $entry_id, &$destroy_callback ) {
512 512
 				FrmEntry::destroy( $entry_id );
513 513
 				// Only call this once.
514 514
 				remove_action( 'frm_entry_form', $destroy_callback );
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 	 * @return array
529 529
 	 */
530 530
 	public static function before_save_settings( $settings, $action ) {
531
-		$settings['gateway']  = ! empty( $settings['gateway'] ) ? (array) $settings['gateway'] : array( 'stripe' );
531
+		$settings['gateway'] = ! empty( $settings['gateway'] ) ? (array) $settings['gateway'] : array( 'stripe' );
532 532
 
533 533
 		if ( in_array( 'square', $settings['gateway'] ) ) {
534 534
 			$currency = FrmSquareLiteConnectHelper::get_merchant_currency();
Please login to merge, or discard this patch.
classes/controllers/FrmSettingsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 				$section['function'] = $original;
174 174
 			}
175 175
 
176
-			$sections[ $key ] = $section;
176
+			$sections[$key] = $section;
177 177
 		}//end foreach
178 178
 
179 179
 		return $sections;
@@ -193,8 +193,8 @@  discard block
 block discarded – undo
193 193
 
194 194
 		foreach ( $sections as $key => $section ) {
195 195
 			if ( in_array( $key, $payment_section_keys, true ) ) {
196
-				self::$removed_payments_sections[ $key ] = $section;
197
-				unset( $sections[ $key ] );
196
+				self::$removed_payments_sections[$key] = $section;
197
+				unset( $sections[$key] );
198 198
 			}
199 199
 		}
200 200
 
@@ -226,11 +226,11 @@  discard block
 block discarded – undo
226 226
 
227 227
 		$section  = FrmAppHelper::get_post_param( 'tab', '', 'sanitize_text_field' );
228 228
 		$sections = self::get_settings_tabs();
229
-		if ( ! isset( $sections[ $section ] ) ) {
229
+		if ( ! isset( $sections[$section] ) ) {
230 230
 			wp_die();
231 231
 		}
232 232
 
233
-		$section = $sections[ $section ];
233
+		$section = $sections[$section];
234 234
 
235 235
 		if ( isset( $section['class'] ) ) {
236 236
 			call_user_func( array( $section['class'], $section['function'] ) );
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldType.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
 		$field_val = '';
157 157
 		if ( is_object( $this->field ) ) {
158 158
 			$field_val = $this->field->{$column};
159
-		} elseif ( is_array( $this->field ) && isset( $this->field[ $column ] ) ) {
160
-			$field_val = $this->field[ $column ];
159
+		} elseif ( is_array( $this->field ) && isset( $this->field[$column] ) ) {
160
+			$field_val = $this->field[$column];
161 161
 		}
162 162
 
163 163
 		return $field_val;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		if ( is_object( $this->field ) ) {
172 172
 			$this->field->{$column} = $value;
173 173
 		} elseif ( is_array( $this->field ) ) {
174
-			$this->field[ $column ] = $value;
174
+			$this->field[$column] = $value;
175 175
 		}
176 176
 	}
177 177
 
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 			printf(
631 631
 				/* translators: %s: Field type */
632 632
 				esc_html__( '%s Options', 'formidable' ),
633
-				esc_html( $all_field_types[ $args['display']['type'] ]['name'] )
633
+				esc_html( $all_field_types[$args['display']['type']]['name'] )
634 634
 			);
635 635
 			FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown8_icon', array( 'aria-hidden' => 'true' ) );
636 636
 			?>
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
 	 * New field
731 731
 	 */
732 732
 	public function get_new_field_defaults() {
733
-		$field        = array(
733
+		$field = array(
734 734
 			'name'          => $this->get_new_field_name(),
735 735
 			'description'   => '',
736 736
 			'type'          => $this->type,
@@ -761,8 +761,8 @@  discard block
 block discarded – undo
761 761
 
762 762
 		$fields = array_merge( $fields, $pro_fields );
763 763
 
764
-		if ( isset( $fields[ $this->type ] ) ) {
765
-			$name = is_array( $fields[ $this->type ] ) ? $fields[ $this->type ]['name'] : $fields[ $this->type ];
764
+		if ( isset( $fields[$this->type] ) ) {
765
+			$name = is_array( $fields[$this->type] ) ? $fields[$this->type]['name'] : $fields[$this->type];
766 766
 		}
767 767
 
768 768
 		return $name;
@@ -779,7 +779,7 @@  discard block
 block discarded – undo
779 779
 	 * @return array
780 780
 	 */
781 781
 	public function get_default_field_options() {
782
-		$opts        = array(
782
+		$opts = array(
783 783
 			'size'               => '',
784 784
 			'max'                => '',
785 785
 			'label'              => '',
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
 	 * @return void
1024 1024
 	 */
1025 1025
 	public function set_aria_invalid_error( &$shortcode_atts, $args ) {
1026
-		$shortcode_atts['aria-invalid'] = isset( $args['errors'][ 'field' . $this->field_id ] ) ? 'true' : 'false';
1026
+		$shortcode_atts['aria-invalid'] = isset( $args['errors']['field' . $this->field_id] ) ? 'true' : 'false';
1027 1027
 	}
1028 1028
 
1029 1029
 	/**
@@ -1183,11 +1183,11 @@  discard block
 block discarded – undo
1183 1183
 		}
1184 1184
 
1185 1185
 		$options = array_values( $this->field['options'] );
1186
-		if ( ! isset( $options[ $opt ] ) ) {
1186
+		if ( ! isset( $options[$opt] ) ) {
1187 1187
 			return $hidden;
1188 1188
 		}
1189 1189
 
1190
-		$option = $options[ $opt ];
1190
+		$option = $options[$opt];
1191 1191
 		if ( is_array( $option ) ) {
1192 1192
 			$option = $option['value'];
1193 1193
 		}
@@ -1251,8 +1251,8 @@  discard block
 block discarded – undo
1251 1251
 		$selected = $values['field_value'];
1252 1252
 
1253 1253
 		if ( isset( $values['combo_name'] ) ) {
1254
-			$options  = $options[ $values['combo_name'] ];
1255
-			$selected = is_array( $selected ) && isset( $selected[ $values['combo_name'] ] ) ? $selected[ $values['combo_name'] ] : '';
1254
+			$options  = $options[$values['combo_name']];
1255
+			$selected = is_array( $selected ) && isset( $selected[$values['combo_name']] ) ? $selected[$values['combo_name']] : '';
1256 1256
 		}
1257 1257
 
1258 1258
 		$input = $this->select_tag( $values );
@@ -1307,7 +1307,7 @@  discard block
 block discarded – undo
1307 1307
 	}
1308 1308
 
1309 1309
 	protected function fill_display_field_values( $args = array() ) {
1310
-		$defaults        = array(
1310
+		$defaults = array(
1311 1311
 			'field_name'    => 'item_meta[' . $this->get_field_column( 'id' ) . ']',
1312 1312
 			'field_id'      => $this->get_field_column( 'id' ),
1313 1313
 			'field_plus_id' => '',
@@ -1364,7 +1364,7 @@  discard block
 block discarded – undo
1364 1364
 			}
1365 1365
 		}
1366 1366
 
1367
-		if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) && ! $custom_error_fields ) {
1367
+		if ( isset( $args['errors']['field' . $args['field_id']] ) && ! $custom_error_fields ) {
1368 1368
 			if ( $error_comes_first ) {
1369 1369
 				array_unshift( $describedby, 'frm_error_' . $args['html_id'] );
1370 1370
 			} else {
@@ -1442,11 +1442,11 @@  discard block
 block discarded – undo
1442 1442
 
1443 1443
 		$field_id = $this->get_field_column( 'id' );
1444 1444
 		if ( ! array_key_exists( $field_id, $frm_validated_unique_values ) ) {
1445
-			$frm_validated_unique_values[ $field_id ] = array();
1445
+			$frm_validated_unique_values[$field_id] = array();
1446 1446
 			return false;
1447 1447
 		}
1448 1448
 
1449
-		$already_validated_this_value = in_array( $value, $frm_validated_unique_values[ $field_id ], true );
1449
+		$already_validated_this_value = in_array( $value, $frm_validated_unique_values[$field_id], true );
1450 1450
 		return $already_validated_this_value;
1451 1451
 	}
1452 1452
 
@@ -1471,7 +1471,7 @@  discard block
 block discarded – undo
1471 1471
 	private function value_validated_as_unique( $value ) {
1472 1472
 		global $frm_validated_unique_values;
1473 1473
 		$field_id                                   = $this->get_field_column( 'id' );
1474
-		$frm_validated_unique_values[ $field_id ][] = $value;
1474
+		$frm_validated_unique_values[$field_id][] = $value;
1475 1475
 	}
1476 1476
 
1477 1477
 	/**
@@ -1516,8 +1516,8 @@  discard block
 block discarded – undo
1516 1516
 		$value = $this->prepare_display_value( $value, $atts );
1517 1517
 
1518 1518
 		if ( is_array( $value ) ) {
1519
-			if ( ! empty( $atts['show'] ) && isset( $value[ $atts['show'] ] ) ) {
1520
-				$value = $value[ $atts['show'] ];
1519
+			if ( ! empty( $atts['show'] ) && isset( $value[$atts['show']] ) ) {
1520
+				$value = $value[$atts['show']];
1521 1521
 			} elseif ( empty( $atts['return_array'] ) ) {
1522 1522
 				$sep   = isset( $atts['sep'] ) ? $atts['sep'] : ', ';
1523 1523
 				$value = FrmAppHelper::safe_implode( $sep, $value );
@@ -1647,8 +1647,8 @@  discard block
 block discarded – undo
1647 1647
 		$saved_entries = $atts['ids'];
1648 1648
 		$new_value     = array();
1649 1649
 		foreach ( (array) $value as $old_child_id ) {
1650
-			if ( isset( $saved_entries[ $old_child_id ] ) ) {
1651
-				$new_value[] = $saved_entries[ $old_child_id ];
1650
+			if ( isset( $saved_entries[$old_child_id] ) ) {
1651
+				$new_value[] = $saved_entries[$old_child_id];
1652 1652
 			}
1653 1653
 		}
1654 1654
 
Please login to merge, or discard this patch.
classes/controllers/FrmFieldsController.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 		$_GET['page'] = 'formidable';
27 27
 
28
-		$values     = array(
28
+		$values = array(
29 29
 			'id'         => FrmAppHelper::get_post_param( 'form_id', '', 'absint' ),
30 30
 			'doing_ajax' => true,
31 31
 		);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 			ob_start();
50 50
 			self::load_single_field( $field, $values );
51
-			$field_html[ absint( $field->id ) ] = ob_get_contents();
51
+			$field_html[absint( $field->id )] = ob_get_contents();
52 52
 			ob_end_clean();
53 53
 		}
54 54
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 			foreach ( $opts as $opt_key => $opt ) {
264 264
 				if ( strpos( $opt, '|' ) !== false ) {
265 265
 					$vals             = explode( '|', $opt );
266
-					$opts[ $opt_key ] = array(
266
+					$opts[$opt_key] = array(
267 267
 						'label' => trim( $vals[0] ),
268 268
 						'value' => trim( $vals[1] ),
269 269
 					);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 			$other_array = array();
279 279
 			foreach ( $field['options'] as $opt_key => $opt ) {
280 280
 				if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) {
281
-					$other_array[ $opt_key ] = $opt;
281
+					$other_array[$opt_key] = $opt;
282 282
 				}
283 283
 				unset( $opt_key, $opt );
284 284
 			}
@@ -321,18 +321,18 @@  discard block
 block discarded – undo
321 321
 		$frm_settings         = FrmAppHelper::get_settings();
322 322
 		$field_types          = FrmFieldTypeOptionData::get_field_types( $field['type'] );
323 323
 
324
-		if ( ! isset( $all_field_types[ $field['type'] ] ) ) {
324
+		if ( ! isset( $all_field_types[$field['type']] ) ) {
325 325
 			// Add fallback for an add-on field type that has been deactivated.
326
-			$all_field_types[ $field['type'] ] = array(
326
+			$all_field_types[$field['type']] = array(
327 327
 				'name' => ucfirst( $field['type'] ),
328 328
 				'icon' => 'frm_icon_font frm_pencil_icon',
329 329
 			);
330
-		} elseif ( ! is_array( $all_field_types[ $field['type'] ] ) ) {
330
+		} elseif ( ! is_array( $all_field_types[$field['type']] ) ) {
331 331
 			// Fallback for fields added in a more basic way.
332
-			FrmFormsHelper::prepare_field_type( $all_field_types[ $field['type'] ] );
332
+			FrmFormsHelper::prepare_field_type( $all_field_types[$field['type']] );
333 333
 		}
334 334
 
335
-		$type_name = $all_field_types[ $field['type'] ]['name'];
335
+		$type_name = $all_field_types[$field['type']]['name'];
336 336
 		if ( $field['type'] === 'divider' && FrmField::is_option_true( $field, 'repeat' ) ) {
337 337
 			$type_name = $all_field_types['divider|repeat']['name'];
338 338
 		}
@@ -409,14 +409,14 @@  discard block
 block discarded – undo
409 409
 
410 410
 		if ( FrmAppHelper::pro_is_connected() ) {
411 411
 			foreach ( $settings as $type ) {
412
-				if ( ! empty( $field[ $type ] ) ) {
412
+				if ( ! empty( $field[$type] ) ) {
413 413
 					$active = $type;
414 414
 				}
415 415
 			}
416 416
 		}
417 417
 
418
-		$types[ $active ]['class']  .= ' current';
419
-		$types[ $active ]['current'] = true;
418
+		$types[$active]['class']  .= ' current';
419
+		$types[$active]['current'] = true;
420 420
 
421 421
 		return $types;
422 422
 	}
@@ -434,8 +434,8 @@  discard block
 block discarded – undo
434 434
 			'website' => 'url',
435 435
 			'image'   => 'url',
436 436
 		);
437
-		if ( isset( $type_switch[ $type ] ) ) {
438
-			$type = $type_switch[ $type ];
437
+		if ( isset( $type_switch[$type] ) ) {
438
+			$type = $type_switch[$type];
439 439
 		}
440 440
 
441 441
 		$pro_fields = FrmField::pro_field_selection();
@@ -590,11 +590,11 @@  discard block
 block discarded – undo
590 590
 		// include "col" for valid html
591 591
 		$unit = trim( preg_replace( '/[0-9]+/', '', $field['size'] ) );
592 592
 
593
-		if ( ! isset( $calc[ $unit ] ) ) {
593
+		if ( ! isset( $calc[$unit] ) ) {
594 594
 			return;
595 595
 		}
596 596
 
597
-		$size = (float) str_replace( $unit, '', $field['size'] ) / $calc[ $unit ];
597
+		$size = (float) str_replace( $unit, '', $field['size'] ) / $calc[$unit];
598 598
 
599 599
 		$add_html['cols'] = 'cols="' . absint( $size ) . '"';
600 600
 	}
@@ -827,11 +827,11 @@  discard block
 block discarded – undo
827 827
 	private static function get_form_for_js_validation( $field ) {
828 828
 		global $frm_vars;
829 829
 		if ( ! empty( $frm_vars['js_validate_forms'] ) ) {
830
-			if ( isset( $frm_vars['js_validate_forms'][ $field['form_id'] ] ) ) {
831
-				return $frm_vars['js_validate_forms'][ $field['form_id'] ];
830
+			if ( isset( $frm_vars['js_validate_forms'][$field['form_id']] ) ) {
831
+				return $frm_vars['js_validate_forms'][$field['form_id']];
832 832
 			}
833
-			if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][ $field['parent_form_id'] ] ) ) {
834
-				return $frm_vars['js_validate_forms'][ $field['parent_form_id'] ];
833
+			if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][$field['parent_form_id']] ) ) {
834
+				return $frm_vars['js_validate_forms'][$field['parent_form_id']];
835 835
 			}
836 836
 		}
837 837
 		return false;
@@ -918,13 +918,13 @@  discard block
 block discarded – undo
918 918
 		foreach ( $field['shortcodes'] as $k => $v ) {
919 919
 			if ( isset( $field['subfield_name'] ) && 0 === strpos( $k, 'aria-invalid' ) ) {
920 920
 				$subfield_name = $field['subfield_name'];
921
-				if ( ! isset( $field['shortcodes'][ 'aria-invalid-' . $subfield_name ] ) ) {
921
+				if ( ! isset( $field['shortcodes']['aria-invalid-' . $subfield_name] ) ) {
922 922
 					continue;
923 923
 				}
924 924
 				// Change the key to the correct aria-invalid value so that $add_html is set correctly for the current subfield of a combo field.
925 925
 				$k = 'aria-invalid';
926
-				$v = $field['shortcodes'][ 'aria-invalid-' . $subfield_name ];
927
-				unset( $field['shortcodes'][ 'aria-invalid-' . $subfield_name ] );
926
+				$v = $field['shortcodes']['aria-invalid-' . $subfield_name];
927
+				unset( $field['shortcodes']['aria-invalid-' . $subfield_name] );
928 928
 			}
929 929
 			if ( 'opt' === $k || ! self::should_allow_input_attribute( $k ) ) {
930 930
 				continue;
@@ -932,10 +932,10 @@  discard block
 block discarded – undo
932 932
 
933 933
 			if ( is_numeric( $k ) && strpos( $v, '=' ) ) {
934 934
 				$add_html[] = $v;
935
-			} elseif ( ! empty( $k ) && isset( $add_html[ $k ] ) ) {
936
-				$add_html[ $k ] = str_replace( $k . '="', $k . '="' . $v, $add_html[ $k ] );
935
+			} elseif ( ! empty( $k ) && isset( $add_html[$k] ) ) {
936
+				$add_html[$k] = str_replace( $k . '="', $k . '="' . $v, $add_html[$k] );
937 937
 			} else {
938
-				$add_html[ $k ] = $k . '="' . esc_attr( $v ) . '"';
938
+				$add_html[$k] = $k . '="' . esc_attr( $v ) . '"';
939 939
 			}
940 940
 
941 941
 			unset( $k, $v );
Please login to merge, or discard this patch.
classes/views/frm-settings/payments.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@
 block discarded – undo
31 31
 	if ( $is_active ) {
32 32
 		$input_params['checked'] = 'checked';
33 33
 	}
34
-	$other_section_selectors      = array_map(
35
-		function ( $section ) {
34
+	$other_section_selectors = array_map(
35
+		function( $section ) {
36 36
 			return "#frm_{$section}_settings_section";
37 37
 		},
38 38
 		array_diff( array_keys( $payment_sections ), array( $key ) )
Please login to merge, or discard this patch.
classes/views/frm-fields/front-end/combo-field/combo-field.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 			$sub_field_class   = "frm_form_field form-field frm_form_subfield-{$name} {$sub_field['wrapper_classes']}";
42 42
 			$sub_field_desc    = FrmField::get_option( $field, $name . '_desc' );
43 43
 
44
-			if ( isset( $errors[ 'field' . $field_id . '-' . $name ] ) ) {
44
+			if ( isset( $errors['field' . $field_id . '-' . $name] ) ) {
45 45
 				$sub_field_class .= ' frm_blank_field';
46 46
 			}
47 47
 			?>
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 						$attrs = array(
61 61
 							'type'  => $sub_field['type'],
62 62
 							'id'    => $html_id . '_' . $name,
63
-							'value' => isset( $field_value[ $name ] ) ? $field_value[ $name ] : '',
63
+							'value' => isset( $field_value[$name] ) ? $field_value[$name] : '',
64 64
 						);
65 65
 
66
-						if ( ! empty( $field_value[ $name ] ) ) {
67
-							$attrs['data-frmval'] = $field_value[ $name ];
66
+						if ( ! empty( $field_value[$name] ) ) {
67
+							$attrs['data-frmval'] = $field_value[$name];
68 68
 						}
69 69
 						if ( empty( $args['remove_names'] ) ) {
70 70
 							$attrs['name'] = $field_name . '[' . $name . ']';
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 				}
82 82
 
83 83
 				// Don't show individual field errors when there is a combo field error.
84
-				if ( ! empty( $errors ) && isset( $errors[ 'field' . $field_id . '-' . $name ] ) && ! isset( $errors[ 'field' . $field_id ] ) ) {
84
+				if ( ! empty( $errors ) && isset( $errors['field' . $field_id . '-' . $name] ) && ! isset( $errors['field' . $field_id] ) ) {
85 85
 					?>
86
-					<div class="frm_error" role="alert"><?php echo esc_html( $errors[ 'field' . $field_id . '-' . $name ] ); ?></div>
86
+					<div class="frm_error" role="alert"><?php echo esc_html( $errors['field' . $field_id . '-' . $name] ); ?></div>
87 87
 				<?php } ?>
88 88
 			</div>
89 89
 			<?php
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/html-content.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 		<?php esc_html_e( 'Content', 'formidable' ); ?>
9 9
 	</label>
10 10
 	<?php
11
-	$e_args  = array(
11
+	$e_args = array(
12 12
 		'textarea_name' => 'field_options[description_' . absint( $field['id'] ) . ']',
13 13
 		'textarea_rows' => 7,
14 14
 	);
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/combo-field/sub-field-options.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 				?>
41 41
 				<p class="frm6 frm_form_field">
42 42
 					<label class="frm_description" for="<?php echo esc_attr( $input_id ); ?>">
43
-						<?php echo esc_html( $labels[ $option ] ); ?>
43
+						<?php echo esc_html( $labels[$option] ); ?>
44 44
 					</label>
45 45
 					<span class="frm-with-right-icon">
46 46
 						<?php
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 							type="text"
56 56
 							name="<?php echo esc_attr( $input_name ); ?>"
57 57
 							id="<?php echo esc_attr( $input_id ); ?>"
58
-							value="<?php echo esc_attr( isset( $default_value[ $sub_field['name'] ] ) ? $default_value[ $sub_field['name'] ] : '' ); ?>"
58
+							value="<?php echo esc_attr( isset( $default_value[$sub_field['name']] ) ? $default_value[$sub_field['name']] : '' ); ?>"
59 59
 							data-changeme="field_<?php echo esc_attr( $field_key . '_' . $sub_field['name'] ); ?>"
60 60
 							data-changeatt="value"
61 61
 						/>
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
 				?>
73 73
 				<p class="frm6 frm_form_field">
74 74
 					<label class="frm_description" for="<?php echo esc_attr( $input_id ); ?>">
75
-						<?php echo esc_html( $labels[ $option ] ); ?>
75
+						<?php echo esc_html( $labels[$option] ); ?>
76 76
 					</label>
77 77
 					<input
78 78
 						type="text"
79 79
 						name="<?php echo esc_attr( $input_name ); ?>"
80 80
 						id="<?php echo esc_attr( $input_id ); ?>"
81
-						value="<?php echo esc_attr( isset( $input_value[ $sub_field['name'] ] ) ? $input_value[ $sub_field['name'] ] : '' ); ?>"
81
+						value="<?php echo esc_attr( isset( $input_value[$sub_field['name']] ) ? $input_value[$sub_field['name']] : '' ); ?>"
82 82
 						data-changeme="field_<?php echo esc_attr( $field_key . '_' . $sub_field['name'] ); ?>"
83 83
 						data-changeatt="<?php echo esc_attr( $option ); ?>"
84 84
 					/>
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 				?>
95 95
 				<p class="frm_form_field frm-flex-col">
96 96
 					<label class="frm_description" for="<?php echo esc_attr( $input_id ); ?>">
97
-						<?php echo esc_html( $labels[ $option ] ); ?>
97
+						<?php echo esc_html( $labels[$option] ); ?>
98 98
 					</label>
99 99
 					<textarea
100 100
 						name="<?php echo esc_attr( $input_name ); ?>"
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/generate-options-with-ai.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 if ( empty( $attributes['data-fid'] ) ) {
39 39
 	unset( $data['plugin-status'] );
40 40
 	foreach ( $data as $key => $value ) {
41
-		$attributes[ 'data-' . $key ] = $value;
41
+		$attributes['data-' . $key] = $value;
42 42
 	}
43 43
 }
44 44
 ?>
Please login to merge, or discard this patch.