Completed
Pull Request — master (#1580)
by Stephanie
52s
created
css/_single_theme.css.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
 <?php } ?>
130 130
 
131 131
 .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before{
132
-	content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['-'] : $minus_icons[1]['-'] ); ?>";
132
+	content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['-'] : $minus_icons[1]['-'] ); ?>";
133 133
 }
134 134
 
135 135
 .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_plus_icon:before{
136
-	content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['+'] : $minus_icons[1]['+'] ); ?>";
136
+	content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['+'] : $minus_icons[1]['+'] ); ?>";
137 137
 }
138 138
 
139 139
 .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before,
@@ -145,14 +145,14 @@  discard block
 block discarded – undo
145 145
 }
146 146
 
147 147
 .<?php echo esc_html( $style_class ); ?> .frm_trigger.active .frm_icon_font.frm_arrow_icon:before{
148
-	content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['-'] : $arrow_icons[1]['-'] ); ?>";
148
+	content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['-'] : $arrow_icons[1]['-'] ); ?>";
149 149
 	<?php if ( ! empty( $section_color ) ) { ?>
150 150
 		color:<?php echo esc_html( $section_color . $important ); ?>;
151 151
 	<?php } ?>
152 152
 }
153 153
 
154 154
 .<?php echo esc_html( $style_class ); ?> .frm_trigger .frm_icon_font.frm_arrow_icon:before{
155
-	content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['+'] : $arrow_icons[1]['+'] ); ?>";
155
+	content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['+'] : $arrow_icons[1]['+'] ); ?>";
156 156
 	<?php if ( ! empty( $section_color ) ) { ?>
157 157
 		color:<?php echo esc_html( $section_color . $important ); ?>;
158 158
 	<?php } ?>
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
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
 							type="text"
52 52
 							name="<?php echo esc_attr( $input_name ); ?>"
53 53
 							id="<?php echo esc_attr( $input_id ); ?>"
54
-							value="<?php echo esc_attr( isset( $default_value[ $sub_field['name'] ] ) ? $default_value[ $sub_field['name'] ] : '' ); ?>"
54
+							value="<?php echo esc_attr( isset( $default_value[$sub_field['name']] ) ? $default_value[$sub_field['name']] : '' ); ?>"
55 55
 							data-changeme="field_<?php echo esc_attr( $field_key . '_' . $sub_field['name'] ); ?>"
56 56
 							data-changeatt="value"
57 57
 						/>
58 58
 					</span>
59 59
 					<label class="frm_description" for="<?php echo esc_attr( $input_id ); ?>">
60
-						<?php echo esc_html( $labels[ $option ] ); ?>
60
+						<?php echo esc_html( $labels[$option] ); ?>
61 61
 					</label>
62 62
 				</p>
63 63
 				<?php
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
 						type="text"
75 75
 						name="<?php echo esc_attr( $input_name ); ?>"
76 76
 						id="<?php echo esc_attr( $input_id ); ?>"
77
-						value="<?php echo esc_attr( isset( $input_value[ $sub_field['name'] ] ) ? $input_value[ $sub_field['name'] ] : '' ); ?>"
77
+						value="<?php echo esc_attr( isset( $input_value[$sub_field['name']] ) ? $input_value[$sub_field['name']] : '' ); ?>"
78 78
 						data-changeme="field_<?php echo esc_attr( $field_key . '_' . $sub_field['name'] ); ?>"
79 79
 						data-changeatt="<?php echo esc_attr( $option ); ?>"
80 80
 					/>
81 81
 					<label class="frm_description" for="<?php echo esc_attr( $input_id ); ?>">
82
-						<?php echo esc_html( $labels[ $option ] ); ?>
82
+						<?php echo esc_html( $labels[$option] ); ?>
83 83
 					</label>
84 84
 				</p>
85 85
 				<?php
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 						data-changeme="frm_field_<?php echo esc_attr( $field_id . '_' . $sub_field['name'] ); ?>_desc"
101 101
 					/>
102 102
 					<label class="frm_description" for="<?php echo esc_attr( $input_id ); ?>">
103
-						<?php echo esc_html( $labels[ $option ] ); ?>
103
+						<?php echo esc_html( $labels[$option] ); ?>
104 104
 					</label>
105 105
 				</p>
106 106
 				<?php
Please login to merge, or discard this patch.
classes/models/FrmAntiSpam.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -213,10 +213,10 @@
 block discarded – undo
213 213
 			return false;
214 214
 		}
215 215
 		$form_params = $frm_vars['form_params'];
216
-		if ( ! isset( $form_params[ $this->form_id ] ) ) {
216
+		if ( ! isset( $form_params[$this->form_id] ) ) {
217 217
 			return false;
218 218
 		}
219
-		$this_form_params = $form_params[ $this->form_id ];
219
+		$this_form_params = $form_params[$this->form_id];
220 220
 		return ! empty( $this_form_params['action'] ) && 'update' === $this_form_params['action'];
221 221
 	}
222 222
 
Please login to merge, or discard this patch.
classes/models/FrmHoneypot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 	private function check_honeypot_setting() {
49 49
 		$form = $this->get_form();
50 50
 		$key  = $this->get_option_key();
51
-		return $form->options[ $key ];
51
+		return $form->options[$key];
52 52
 	}
53 53
 
54 54
 	/**
Please login to merge, or discard this patch.
classes/models/FrmValidate.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
 	protected function is_option_on() {
39 39
 		$form = $this->get_form();
40 40
 		$key  = $this->get_option_key();
41
-		return ! empty( $form->options[ $key ] ) && 'off' !== $form->options[ $key ];
41
+		return ! empty( $form->options[$key] ) && 'off' !== $form->options[$key];
42 42
 	}
43 43
 
44 44
 	/**
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldName.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
 		$result = array();
47 47
 
48 48
 		foreach ( $names as $name ) {
49
-			if ( empty( $this->sub_fields[ $name ] ) ) {
49
+			if ( empty( $this->sub_fields[$name] ) ) {
50 50
 				continue;
51 51
 			}
52 52
 
53
-			if ( ! isset( $this->sub_fields[ $name ]['wrapper_classes'] ) ) {
54
-				$this->sub_fields[ $name ]['wrapper_classes'] = $col_class;
55
-			} elseif ( is_array( $this->sub_fields[ $name ]['wrapper_classes'] ) ) {
56
-				$this->sub_fields[ $name ]['wrapper_classes'] = implode( ' ', $this->sub_fields[ $name ]['wrapper_classes'] ) . ' ' . $col_class;
53
+			if ( ! isset( $this->sub_fields[$name]['wrapper_classes'] ) ) {
54
+				$this->sub_fields[$name]['wrapper_classes'] = $col_class;
55
+			} elseif ( is_array( $this->sub_fields[$name]['wrapper_classes'] ) ) {
56
+				$this->sub_fields[$name]['wrapper_classes'] = implode( ' ', $this->sub_fields[$name]['wrapper_classes'] ) . ' ' . $col_class;
57 57
 			} else {
58
-				$this->sub_fields[ $name ]['wrapper_classes'] .= ' ' . $col_class;
58
+				$this->sub_fields[$name]['wrapper_classes'] .= ' ' . $col_class;
59 59
 			}
60 60
 
61
-			$result[ $name ] = $this->sub_fields[ $name ];
61
+			$result[$name] = $this->sub_fields[$name];
62 62
 		}
63 63
 
64 64
 		return $result;
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 		// Default desc.
91 91
 		foreach ( $this->sub_fields as $name => $sub_field ) {
92
-			$extra_options[ $name . '_desc' ] = $sub_field['label'];
92
+			$extra_options[$name . '_desc'] = $sub_field['label'];
93 93
 		}
94 94
 
95 95
 		return $extra_options;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		$name_layout = $this->get_name_layout();
126 126
 
127 127
 		if ( ! empty( $atts['show'] ) ) {
128
-			return isset( $value[ $atts['show'] ] ) ? $value[ $atts['show'] ] : '';
128
+			return isset( $value[$atts['show']] ) ? $value[$atts['show']] : '';
129 129
 		}
130 130
 
131 131
 		$value = wp_parse_args(
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 			$args['sub_fields'] = $this->sub_fields;
199 199
 
200 200
 			foreach ( $hidden_fields as $name => $hidden_field ) {
201
-				$args['sub_fields'][ $name ]['wrapper_classes'] .= ' frm_hidden';
201
+				$args['sub_fields'][$name]['wrapper_classes'] .= ' frm_hidden';
202 202
 			}
203 203
 		}
204 204
 	}
Please login to merge, or discard this patch.
classes/widgets/FrmElementorWidget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
 			foreach ( $forms as $form ) {
88 88
 				$form_title           = '' === $form->name ? __( '(no title)', 'formidable' ) : FrmAppHelper::truncate( $form->name, 50 );
89
-				$options[ $form->id ] = esc_html( $form_title );
89
+				$options[$form->id] = esc_html( $form_title );
90 90
 			}
91 91
 
92 92
 			return $options;
Please login to merge, or discard this patch.
classes/controllers/FrmEntriesController.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -491,7 +491,8 @@
 block discarded – undo
491 491
 
492 492
 	public static function process_entry( $errors = '', $ajax = false ) {
493 493
 		$form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
494
-		if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
494
+		if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) {
495
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
495 496
 			return;
496 497
 		}
497 498
 
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -77,20 +77,20 @@  discard block
 block discarded – undo
77 77
 		global $frm_vars;
78 78
 		$form_id = FrmForm::get_current_form_id();
79 79
 
80
-		$columns[ $form_id . '_id' ]       = 'ID';
81
-		$columns[ $form_id . '_item_key' ] = esc_html__( 'Entry Key', 'formidable' );
80
+		$columns[$form_id . '_id']       = 'ID';
81
+		$columns[$form_id . '_item_key'] = esc_html__( 'Entry Key', 'formidable' );
82 82
 
83 83
 		if ( $form_id ) {
84 84
 			self::get_columns_for_form( $form_id, $columns );
85 85
 		} else {
86
-			$columns[ $form_id . '_form_id' ] = esc_html__( 'Form', 'formidable' );
87
-			$columns[ $form_id . '_name' ]    = esc_html__( 'Entry Name', 'formidable' );
88
-			$columns[ $form_id . '_user_id' ] = esc_html__( 'Created By', 'formidable' );
86
+			$columns[$form_id . '_form_id'] = esc_html__( 'Form', 'formidable' );
87
+			$columns[$form_id . '_name']    = esc_html__( 'Entry Name', 'formidable' );
88
+			$columns[$form_id . '_user_id'] = esc_html__( 'Created By', 'formidable' );
89 89
 		}
90 90
 
91
-		$columns[ $form_id . '_is_draft' ]   = esc_html__( 'Entry Status', 'formidable' );
92
-		$columns[ $form_id . '_created_at' ] = __( 'Entry creation date', 'formidable' );
93
-		$columns[ $form_id . '_updated_at' ] = __( 'Entry update date', 'formidable' );
91
+		$columns[$form_id . '_is_draft']   = esc_html__( 'Entry Status', 'formidable' );
92
+		$columns[$form_id . '_created_at'] = __( 'Entry creation date', 'formidable' );
93
+		$columns[$form_id . '_updated_at'] = __( 'Entry update date', 'formidable' );
94 94
 		self::maybe_add_ip_col( $form_id, $columns );
95 95
 
96 96
 		$frm_vars['cols'] = $columns;
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
 
149 149
 		foreach ( $sub_form_cols as $k => $sub_form_col ) {
150 150
 			if ( FrmField::is_no_save_field( $sub_form_col->type ) ) {
151
-				unset( $sub_form_cols[ $k ] );
151
+				unset( $sub_form_cols[$k] );
152 152
 				continue;
153 153
 			}
154
-			$columns[ $form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id ] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
154
+			$columns[$form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
155 155
 			unset( $sub_form_col );
156 156
 		}
157 157
 	}
@@ -168,15 +168,15 @@  discard block
 block discarded – undo
168 168
 		$has_separate_value = ! FrmField::is_option_empty( $field, 'separate_value' );
169 169
 		$is_post_status     = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] == 'post_status';
170 170
 		if ( $has_separate_value && ! $is_post_status ) {
171
-			$columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
171
+			$columns[$form_id . '_frmsep_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 );
172 172
 		}
173 173
 
174
-		$columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
174
+		$columns[$form_id . '_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 );
175 175
 	}
176 176
 
177 177
 	private static function maybe_add_ip_col( $form_id, &$columns ) {
178 178
 		if ( FrmAppHelper::ips_saved() ) {
179
-			$columns[ $form_id . '_ip' ] = 'IP';
179
+			$columns[$form_id . '_ip'] = 'IP';
180 180
 		}
181 181
 	}
182 182
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		foreach ( $meta_value as $mk => $mv ) {
216 216
 			// Remove blank values.
217 217
 			if ( empty( $mv ) ) {
218
-				unset( $meta_value[ $mk ] );
218
+				unset( $meta_value[$mk] );
219 219
 			}
220 220
 		}
221 221
 
@@ -290,14 +290,14 @@  discard block
 block discarded – undo
290 290
 		);
291 291
 
292 292
 		if ( ! $form_id ) {
293
-			$columns[ $form_id . '_user_id' ] = 'user_id';
294
-			$columns[ $form_id . '_name' ]    = 'name';
295
-			$columns[ $form_id . '_form_id' ] = 'form_id';
293
+			$columns[$form_id . '_user_id'] = 'user_id';
294
+			$columns[$form_id . '_name']    = 'name';
295
+			$columns[$form_id . '_form_id'] = 'form_id';
296 296
 		}
297 297
 
298 298
 		foreach ( $fields as $field ) {
299 299
 			if ( self::field_supports_sorting( $field ) ) {
300
-				$columns[ $form_id . '_' . $field->field_key ] = 'meta_' . $field->id;
300
+				$columns[$form_id . '_' . $field->field_key] = 'meta_' . $field->id;
301 301
 			}
302 302
 		}
303 303
 
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 			$atts['form_id'] . '_item_key' => '',
385 385
 			$atts['form_id'] . '_id'       => '',
386 386
 		);
387
-		$cols         = $remove_first + array_reverse( $frm_vars['cols'], true );
387
+		$cols = $remove_first + array_reverse( $frm_vars['cols'], true );
388 388
 
389 389
 		$i = $atts['i'];
390 390
 
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
 			if ( empty( $result ) || ! in_array( $col_key, $result, true ) ) {
397 397
 				$result[] = $col_key;
398
-				--$i;
398
+				-- $i;
399 399
 			}
400 400
 
401 401
 			unset( $col_key, $col );
@@ -545,9 +545,9 @@  discard block
 block discarded – undo
545 545
 		if ( ! isset( $frm_vars['form_params'] ) ) {
546 546
 			$frm_vars['form_params'] = array();
547 547
 		}
548
-		$frm_vars['form_params'][ $form->id ] = $params;
548
+		$frm_vars['form_params'][$form->id] = $params;
549 549
 
550
-		if ( isset( $frm_vars['created_entries'][ $form_id ] ) ) {
550
+		if ( isset( $frm_vars['created_entries'][$form_id] ) ) {
551 551
 			return;
552 552
 		}
553 553
 
@@ -563,16 +563,16 @@  discard block
 block discarded – undo
563 563
 		 */
564 564
 		$errors = apply_filters( 'frm_entries_before_create', $errors, $form );
565 565
 
566
-		$frm_vars['created_entries'][ $form_id ] = array( 'errors' => $errors );
566
+		$frm_vars['created_entries'][$form_id] = array( 'errors' => $errors );
567 567
 
568 568
 		if ( empty( $errors ) ) {
569 569
 			$_POST['frm_skip_cookie'] = 1;
570 570
 			$do_success               = false;
571 571
 			if ( $params['action'] === 'create' ) {
572
-				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) {
573
-					$frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
572
+				if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][$form_id]['entry_id'] ) ) {
573
+					$frm_vars['created_entries'][$form_id]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
574 574
 
575
-					$params['id'] = $frm_vars['created_entries'][ $form_id ]['entry_id'];
575
+					$params['id'] = $frm_vars['created_entries'][$form_id]['entry_id'];
576 576
 					$do_success   = true;
577 577
 				}
578 578
 			}
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldUserID.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 	protected function get_field_value( $args ) {
53 53
 		$user_ID      = get_current_user_id();
54 54
 		$user_ID      = ( $user_ID ? $user_ID : '' );
55
-		$posted_value = ( FrmAppHelper::is_admin() && $_POST && isset( $_POST['item_meta'][ $this->field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
55
+		$posted_value = ( FrmAppHelper::is_admin() && $_POST && isset( $_POST['item_meta'][$this->field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
56 56
 		$action       = ( isset( $args['action'] ) ? $args['action'] : ( isset( $args['form_action'] ) ? $args['form_action'] : '' ) );
57 57
 		$updating     = $action == 'update';
58 58
 		return ( is_numeric( $this->field['value'] ) || $posted_value || $updating ) ? $this->field['value'] : $user_ID;
Please login to merge, or discard this patch.