Completed
Pull Request — master (#1415)
by Stephanie
32s
created
classes/helpers/FrmTipsHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 			'page'  => '',
46 46
 			'class' => 'frm-mt-0',
47 47
 		);
48
-		$tip      = array_merge( $defaults, $tip );
48
+		$tip = array_merge( $defaults, $tip );
49 49
 
50 50
 		if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
51 51
 			$tip['link']['medium'] = 'tip';
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 	 * @return array
373 373
 	 */
374 374
 	public static function get_banner_tip() {
375
-		$tips       = array(
375
+		$tips = array(
376 376
 			array(
377 377
 				'link' => array(
378 378
 					'medium'  => 'banner',
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 			),
400 400
 		);
401 401
 		$random     = rand( 0, count( $tips ) - 1 );
402
-		$tip        = $tips[ $random ];
402
+		$tip        = $tips[$random];
403 403
 		$tip['num'] = $random;
404 404
 
405 405
 		return $tip;
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 	public static function get_random_tip( $tips ) {
409 409
 		$random = rand( 0, count( $tips ) - 1 );
410 410
 
411
-		return $tips[ $random ];
411
+		return $tips[$random];
412 412
 	}
413 413
 
414 414
 	/**
Please login to merge, or discard this patch.
classes/models/FrmEmailStats.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 * @param array $stats Statistics section data.
123 123
 	 */
124 124
 	protected function add_payments_data( &$stats ) {
125
-		$payment_data  = FrmEmailSummaryHelper::get_payments_data( $this->from_date, $this->to_date );
125
+		$payment_data = FrmEmailSummaryHelper::get_payments_data( $this->from_date, $this->to_date );
126 126
 		$stats['payments_count'] = array(
127 127
 			'label'   => __( 'Payments collected', 'formidable' ),
128 128
 			'count'   => $payment_data['count'],
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
 		// Build total for each currency.
133 133
 		foreach ( $payment_data['total'] as $currency => $amount ) {
134
-			$stats[ 'payments_total_' . $currency ] = array(
134
+			$stats['payments_total_' . $currency] = array(
135 135
 				// translators: currency name.
136 136
 				'label'   => sprintf( __( 'Total %s', 'formidable' ), strtoupper( $currency ) ),
137 137
 				'count'   => $amount,
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 		}
142 142
 
143 143
 		if ( $this->has_comparison ) {
144
-			$prev_payment_data  = FrmEmailSummaryHelper::get_payments_data( $this->prev_from_date, $this->prev_to_date );
144
+			$prev_payment_data = FrmEmailSummaryHelper::get_payments_data( $this->prev_from_date, $this->prev_to_date );
145 145
 
146 146
 			if ( ! $payment_data['count'] && ! $prev_payment_data['count'] ) {
147 147
 				// Maybe this site doesn't collect payment, hide these sections.
@@ -153,23 +153,23 @@  discard block
 block discarded – undo
153 153
 
154 154
 			// Compare total for each currency.
155 155
 			foreach ( $payment_data['total'] as $currency => $amount ) {
156
-				if ( ! isset( $prev_payment_data['total'][ $currency ] ) ) {
157
-					$stats[ 'payments_total_' . $currency ]['compare'] = 1;
156
+				if ( ! isset( $prev_payment_data['total'][$currency] ) ) {
157
+					$stats['payments_total_' . $currency]['compare'] = 1;
158 158
 					continue;
159 159
 				}
160 160
 
161
-				$stats[ 'payments_total_' . $currency ]['compare'] = $this->get_compare_diff( $amount, $prev_payment_data['total'][ $currency ] );
162
-				unset( $prev_payment_data['total'][ $currency ] );
161
+				$stats['payments_total_' . $currency]['compare'] = $this->get_compare_diff( $amount, $prev_payment_data['total'][$currency] );
162
+				unset( $prev_payment_data['total'][$currency] );
163 163
 			}
164 164
 
165 165
 			// If prev month has more currencies.
166 166
 			foreach ( $prev_payment_data['total'] as $currency => $amount ) {
167
-				$stats[ 'payments_total_' . $currency ] = array(
167
+				$stats['payments_total_' . $currency] = array(
168 168
 					// translators: currency name.
169 169
 					'label'   => sprintf( __( 'Total %s', 'formidable' ), strtoupper( $currency ) ),
170 170
 					'count'   => 0,
171 171
 					'display' => $this->get_formatted_price( 0, $currency ),
172
-					'compare' => -1,
172
+					'compare' => - 1,
173 173
 				);
174 174
 			}
175 175
 		}
Please login to merge, or discard this patch.
classes/helpers/FrmFormsHelper.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 			'class'        => '',
29 29
 			'inc_children' => 'exclude',
30 30
 		);
31
-		$args     = wp_parse_args( $args, $defaults );
31
+		$args = wp_parse_args( $args, $defaults );
32 32
 
33 33
 		if ( ! $args['field_id'] ) {
34 34
 			$args['field_id'] = $field_name;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public static function add_html_attr( $class, $param, &$add_html ) {
72 72
 		if ( ! empty( $class ) ) {
73
-			$add_html[ $param ] = sanitize_title( $param ) . '="' . esc_attr( trim( sanitize_text_field( $class ) ) ) . '"';
73
+			$add_html[$param] = sanitize_title( $param ) . '="' . esc_attr( trim( sanitize_text_field( $class ) ) ) . '"';
74 74
 		}
75 75
 	}
76 76
 
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
 			'description' => '',
294 294
 		);
295 295
 		foreach ( $defaults as $var => $default ) {
296
-			if ( ! isset( $values[ $var ] ) ) {
297
-				$values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
296
+			if ( ! isset( $values[$var] ) ) {
297
+				$values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
298 298
 			}
299 299
 		}
300 300
 
@@ -309,8 +309,8 @@  discard block
 block discarded – undo
309 309
 			'parent_form_id' => 0,
310 310
 		);
311 311
 		foreach ( $defaults as $var => $default ) {
312
-			if ( ! isset( $values[ $var ] ) ) {
313
-				$values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
312
+			if ( ! isset( $values[$var] ) ) {
313
+				$values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
314 314
 			}
315 315
 		}
316 316
 		unset( $defaults );
@@ -347,16 +347,16 @@  discard block
 block discarded – undo
347 347
 		$defaults = self::get_default_opts();
348 348
 		foreach ( $defaults as $var => $default ) {
349 349
 			if ( is_array( $default ) ) {
350
-				if ( ! isset( $values[ $var ] ) ) {
351
-					$values[ $var ] = ( $record && isset( $record->options[ $var ] ) ) ? $record->options[ $var ] : array();
350
+				if ( ! isset( $values[$var] ) ) {
351
+					$values[$var] = ( $record && isset( $record->options[$var] ) ) ? $record->options[$var] : array();
352 352
 				}
353 353
 
354 354
 				foreach ( $default as $k => $v ) {
355
-					$values[ $var ][ $k ] = ( $post_values && isset( $post_values[ $var ][ $k ] ) ) ? $post_values[ $var ][ $k ] : ( ( $record && isset( $record->options[ $var ] ) && isset( $record->options[ $var ][ $k ] ) ) ? $record->options[ $var ][ $k ] : $v );
355
+					$values[$var][$k] = ( $post_values && isset( $post_values[$var][$k] ) ) ? $post_values[$var][$k] : ( ( $record && isset( $record->options[$var] ) && isset( $record->options[$var][$k] ) ) ? $record->options[$var][$k] : $v );
356 356
 
357 357
 					if ( is_array( $v ) ) {
358 358
 						foreach ( $v as $k1 => $v1 ) {
359
-							$values[ $var ][ $k ][ $k1 ] = ( $post_values && isset( $post_values[ $var ][ $k ][ $k1 ] ) ) ? $post_values[ $var ][ $k ][ $k1 ] : ( ( $record && isset( $record->options[ $var ] ) && isset( $record->options[ $var ][ $k ] ) && isset( $record->options[ $var ][ $k ][ $k1 ] ) ) ? $record->options[ $var ][ $k ][ $k1 ] : $v1 );
359
+							$values[$var][$k][$k1] = ( $post_values && isset( $post_values[$var][$k][$k1] ) ) ? $post_values[$var][$k][$k1] : ( ( $record && isset( $record->options[$var] ) && isset( $record->options[$var][$k] ) && isset( $record->options[$var][$k][$k1] ) ) ? $record->options[$var][$k][$k1] : $v1 );
360 360
 							unset( $k1, $v1 );
361 361
 						}
362 362
 					}
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 					unset( $k, $v );
365 365
 				}
366 366
 			} else {
367
-				$values[ $var ] = ( $post_values && isset( $post_values['options'][ $var ] ) ) ? $post_values['options'][ $var ] : ( ( $record && isset( $record->options[ $var ] ) ) ? $record->options[ $var ] : $default );
367
+				$values[$var] = ( $post_values && isset( $post_values['options'][$var] ) ) ? $post_values['options'][$var] : ( ( $record && isset( $record->options[$var] ) ) ? $record->options[$var] : $default );
368 368
 			}
369 369
 
370 370
 			unset( $var, $default );
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 	public static function fill_form_options( &$options, $values ) {
411 411
 		$defaults = self::get_default_opts();
412 412
 		foreach ( $defaults as $var => $default ) {
413
-			$options[ $var ] = isset( $values['options'][ $var ] ) ? $values['options'][ $var ] : $default;
413
+			$options[$var] = isset( $values['options'][$var] ) ? $values['options'][$var] : $default;
414 414
 			unset( $var, $default );
415 415
 		}
416 416
 	}
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 	public static function insert_opt_html( $args ) {
586 586
 		$class  = isset( $args['class'] ) ? $args['class'] : '';
587 587
 		$fields = FrmField::all_field_selection();
588
-		$field  = isset( $fields[ $args['type'] ] ) ? $fields[ $args['type'] ] : array();
588
+		$field  = isset( $fields[$args['type']] ) ? $fields[$args['type']] : array();
589 589
 
590 590
 		self::prepare_field_type( $field );
591 591
 
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
 			FrmField::update( $field->id, array( 'field_order' => $field->field_order + 2 ) );
742 742
 		}
743 743
 
744
-		$add_order    += 2;
744
+		$add_order += 2;
745 745
 		$open         = false;
746 746
 		$reset_fields = true;
747 747
 	}
@@ -1148,10 +1148,10 @@  discard block
 block discarded – undo
1148 1148
 				$link .= ' onclick="return confirm(\'' . esc_attr( $link_details['confirm'] ) . '\')"';
1149 1149
 			}
1150 1150
 
1151
-			$label = ( isset( $link_details[ $length ] ) ? $link_details[ $length ] : $link_details['label'] );
1152
-			if ( $length == 'icon' && isset( $link_details[ $length ] ) ) {
1151
+			$label = ( isset( $link_details[$length] ) ? $link_details[$length] : $link_details['label'] );
1152
+			if ( $length == 'icon' && isset( $link_details[$length] ) ) {
1153 1153
 				$label = '<span class="' . $label . '" title="' . esc_attr( $link_details['label'] ) . '" aria-hidden="true"></span>';
1154
-				$link  .= ' aria-label="' . esc_attr( $link_details['label'] ) . '"';
1154
+				$link .= ' aria-label="' . esc_attr( $link_details['label'] ) . '"';
1155 1155
 			}
1156 1156
 
1157 1157
 			$link .= '>' . $label . '</a>';
@@ -1296,7 +1296,7 @@  discard block
 block discarded – undo
1296 1296
 			$status = 'publish';
1297 1297
 		}
1298 1298
 
1299
-		$name = $nice_names[ $status ];
1299
+		$name = $nice_names[$status];
1300 1300
 
1301 1301
 		return $name;
1302 1302
 	}
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
 		$icon = $icons[''];
1361 1361
 		if ( count( $categories ) === 1 ) {
1362 1362
 			$category = reset( $categories );
1363
-			$icon     = isset( $icons[ $category ] ) ? $icons[ $category ] : $icon;
1363
+			$icon     = isset( $icons[$category] ) ? $icons[$category] : $icon;
1364 1364
 		} elseif ( ! empty( $categories ) ) {
1365 1365
 			$icons = array_intersect_key( $icons, array_flip( $categories ) );
1366 1366
 			$icon = reset( $icons );
@@ -1498,7 +1498,7 @@  discard block
 block discarded – undo
1498 1498
 
1499 1499
 		foreach ( $item['categories'] as $k => $category ) {
1500 1500
 			if ( in_array( $category, $plans, true ) ) {
1501
-				unset( $item['categories'][ $k ] );
1501
+				unset( $item['categories'][$k] );
1502 1502
 
1503 1503
 				if ( in_array( $category, array( 'Creator', 'Personal' ), true ) ) {
1504 1504
 					// Show the current package name.
@@ -1700,9 +1700,9 @@  discard block
 block discarded – undo
1700 1700
 		}
1701 1701
 
1702 1702
 		foreach ( $shortcodes[0] as $key => $shortcode ) {
1703
-			$options = trim( $shortcodes[3][ $key ] );
1703
+			$options = trim( $shortcodes[3][$key] );
1704 1704
 
1705
-			if ( in_array( $shortcodes[1][ $key ], array( 'if ' ), true ) ) {
1705
+			if ( in_array( $shortcodes[1][$key], array( 'if ' ), true ) ) {
1706 1706
 				// Skip if shortcodes.
1707 1707
 				continue;
1708 1708
 			}
@@ -1712,7 +1712,7 @@  discard block
 block discarded – undo
1712 1712
 				continue;
1713 1713
 			}
1714 1714
 
1715
-			$new_shortcode = '[' . $shortcodes[2][ $key ];
1715
+			$new_shortcode = '[' . $shortcodes[2][$key];
1716 1716
 			if ( $options ) {
1717 1717
 				$new_shortcode .= ' ' . $options;
1718 1718
 			}
Please login to merge, or discard this patch.
stripe/models/FrmTransLitePayment.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -126,11 +126,11 @@
 block discarded – undo
126 126
 		foreach ( $payments as $payment ) {
127 127
 			list( $amount, $currency ) = FrmTransLiteAppHelper::get_amount_and_currency_from_payment( $payment );
128 128
 
129
-			if ( ! isset( $data[ $currency ] ) ) {
130
-				$data[ $currency ] = 0;
129
+			if ( ! isset( $data[$currency] ) ) {
130
+				$data[$currency] = 0;
131 131
 			}
132 132
 
133
-			$data[ $currency ] += floatval( $amount );
133
+			$data[$currency] += floatval( $amount );
134 134
 		}
135 135
 
136 136
 		return $data;
Please login to merge, or discard this patch.
classes/helpers/FrmEmailSummaryHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
 	 */
237 237
 	public static function get_last_sent_date( $type ) {
238 238
 		$options = self::get_options();
239
-		if ( empty( $options[ 'last_' . $type ] ) ) {
239
+		if ( empty( $options['last_' . $type] ) ) {
240 240
 			return false;
241 241
 		}
242 242
 
243
-		return $options[ 'last_' . $type ];
243
+		return $options['last_' . $type];
244 244
 	}
245 245
 
246 246
 	/**
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	public static function set_last_sent_date( $type, $value = null ) {
253 253
 		$options = self::get_options();
254 254
 
255
-		$options[ 'last_' . $type ] = null === $value ? self::get_date_from_today() : '';
255
+		$options['last_' . $type] = null === $value ? self::get_date_from_today() : '';
256 256
 		self::save_options( $options );
257 257
 	}
258 258
 
Please login to merge, or discard this patch.
classes/controllers/FrmFormTemplatesController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -329,11 +329,11 @@  discard block
 block discarded – undo
329 329
 
330 330
 		// Perform add or remove operation.
331 331
 		if ( 'add' === $operation ) {
332
-			self::$favorite_templates[ $key ][] = $template_id;
332
+			self::$favorite_templates[$key][] = $template_id;
333 333
 		} elseif ( 'remove' === $operation ) {
334
-			$position = array_search( $template_id, self::$favorite_templates[ $key ], true );
334
+			$position = array_search( $template_id, self::$favorite_templates[$key], true );
335 335
 			if ( $position !== false ) {
336
-				unset( self::$favorite_templates[ $key ][ $position ] );
336
+				unset( self::$favorite_templates[$key][$position] );
337 337
 			}
338 338
 		}
339 339
 
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		foreach ( self::$templates as $key => &$template ) {
463 463
 			// Skip the template if the categories are not set.
464 464
 			if ( ! isset( $template['categories'] ) ) {
465
-				unset( self::$templates[ $key ] );
465
+				unset( self::$templates[$key] );
466 466
 				continue;
467 467
 			}
468 468
 
@@ -476,14 +476,14 @@  discard block
 block discarded – undo
476 476
 				// Add the slug to the new array.
477 477
 				$template['category_slugs'][] = $category_slug;
478 478
 
479
-				if ( ! isset( self::$categories[ $category_slug ] ) ) {
480
-					self::$categories[ $category_slug ] = array(
479
+				if ( ! isset( self::$categories[$category_slug] ) ) {
480
+					self::$categories[$category_slug] = array(
481 481
 						'name'  => $category,
482 482
 						'count' => 0,
483 483
 					);
484 484
 				}
485 485
 
486
-				self::$categories[ $category_slug ]['count']++;
486
+				self::$categories[$category_slug]['count'] ++;
487 487
 			}
488 488
 
489 489
 			// Mark the template as favorite if it's in the favorite templates list.
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 		$redundant_cats = array_merge( array( 'PayPal', 'Stripe', 'Twilio' ), FrmFormsHelper::ignore_template_categories() );
497 497
 		foreach ( $redundant_cats as $redundant_cat ) {
498 498
 			$category_slug = sanitize_title( $redundant_cat );
499
-			unset( self::$categories[ $category_slug ] );
499
+			unset( self::$categories[$category_slug] );
500 500
 		}
501 501
 
502 502
 		// Sort the categories by keys alphabetically.
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 				'count' => 0, // Assigned via JavaScript.
521 521
 			);
522 522
 		}
523
-		$special_categories['all-templates']  = array(
523
+		$special_categories['all-templates'] = array(
524 524
 			'name'  => __( 'All Templates', 'formidable' ),
525 525
 			'count' => count( self::$templates ),
526 526
 		);
@@ -547,9 +547,9 @@  discard block
 block discarded – undo
547 547
 	 */
548 548
 	private static function assign_featured_templates() {
549 549
 		foreach ( self::FEATURED_TEMPLATES_KEYS as $key ) {
550
-			if ( isset( self::$templates[ $key ] ) ) {
551
-				self::$templates[ $key ]['is_featured'] = true;
552
-				self::$featured_templates[]             = self::$templates[ $key ];
550
+			if ( isset( self::$templates[$key] ) ) {
551
+				self::$templates[$key]['is_featured'] = true;
552
+				self::$featured_templates[]             = self::$templates[$key];
553 553
 			}
554 554
 		}
555 555
 	}
Please login to merge, or discard this patch.
classes/controllers/FrmXMLController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 			return;
164 164
 		}
165 165
 
166
-		$selected_xml  = isset( $form['xml'] ) && isset( $form['xml'][ $selected_form ] ) ? $form['xml'][ $selected_form ] : '';
166
+		$selected_xml = isset( $form['xml'] ) && isset( $form['xml'][$selected_form] ) ? $form['xml'][$selected_form] : '';
167 167
 		if ( empty( $selected_xml ) || strpos( $selected_xml, 'http' ) !== 0 ) {
168 168
 			return;
169 169
 		}
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
 	 * @param string $value
179 179
 	 */
180 180
 	private static function get_selected_in_form( $form, $value = 'form' ) {
181
-		if ( ! empty( $form ) && isset( $form[ $value ] ) && ! empty( $form[ $value ] ) ) {
182
-			return $form[ $value ];
181
+		if ( ! empty( $form ) && isset( $form[$value] ) && ! empty( $form[$value] ) ) {
182
+			return $form[$value];
183 183
 		}
184 184
 
185 185
 		return '';
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 			}
209 209
 
210 210
 			if ( $for === 'view' ) {
211
-				$item_key  = is_array( $view_keys ) ? $view_keys[ $form_key ] : $view_keys;
211
+				$item_key  = is_array( $view_keys ) ? $view_keys[$form_key] : $view_keys;
212 212
 				$shortcode = '[display-frm-data id=%1$s filter=limited]';
213 213
 			} elseif ( $for === 'form' ) {
214 214
 				$item_key = $form_key;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 				continue;
224 224
 			}
225 225
 
226
-			$page_ids[ $for ] = wp_insert_post(
226
+			$page_ids[$for] = wp_insert_post(
227 227
 				array(
228 228
 					'post_title'   => $name,
229 229
 					'post_type'    => 'page',
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 		// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
378 378
 		$file_type = sanitize_option( 'upload_path', $_FILES['frm_import_file']['name'] );
379 379
 		$file_type = strtolower( pathinfo( $file_type, PATHINFO_EXTENSION ) );
380
-		if ( 'xml' !== $file_type && isset( $export_format[ $file_type ] ) ) {
380
+		if ( 'xml' !== $file_type && isset( $export_format[$file_type] ) ) {
381 381
 			// allow other file types to be imported
382 382
 			do_action( 'frm_before_import_' . $file_type );
383 383
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 		foreach ( $type as $tb_type ) {
472 472
 			$where = array();
473 473
 			$join  = '';
474
-			$table = $tables[ $tb_type ];
474
+			$table = $tables[$tb_type];
475 475
 
476 476
 			$select     = $table . '.id';
477 477
 			$query_vars = array();
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 							$table . '.parent_form_id' => $args['ids'],
487 487
 						);
488 488
 					} else {
489
-						$where[ $table . '.status !' ] = 'draft';
489
+						$where[$table . '.status !'] = 'draft';
490 490
 					}
491 491
 					break;
492 492
 				case 'actions':
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 				case 'items':
500 500
 					// $join = "INNER JOIN {$wpdb->prefix}frm_item_metas im ON ($table.id = im.item_id)";
501 501
 					if ( $args['ids'] ) {
502
-						$where[ $table . '.form_id' ] = $args['ids'];
502
+						$where[$table . '.form_id'] = $args['ids'];
503 503
 					}
504 504
 					break;
505 505
 				case 'styles':
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
 					}
541 541
 			}
542 542
 
543
-			$records[ $tb_type ] = FrmDb::get_col( $table . $join, $where, $select );
543
+			$records[$tb_type] = FrmDb::get_col( $table . $join, $where, $select );
544 544
 			unset( $tb_type );
545 545
 		}
546 546
 
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
 		$no_export_fields = FrmField::no_save_fields();
712 712
 		foreach ( $csv_fields as $k => $f ) {
713 713
 			if ( in_array( $f->type, $no_export_fields, true ) ) {
714
-				unset( $csv_fields[ $k ] );
714
+				unset( $csv_fields[$k] );
715 715
 			}
716 716
 		}
717 717
 
Please login to merge, or discard this patch.
classes/models/FrmForm.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 			}
210 210
 
211 211
 			if ( $new_val !== $value ) {
212
-				$new_values[ $key ] = $new_val;
212
+				$new_values[$key] = $new_val;
213 213
 			}
214 214
 		}
215 215
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 
241 241
 		foreach ( $values as $value_key => $value ) {
242 242
 			if ( $value_key && in_array( $value_key, $form_fields ) ) {
243
-				$new_values[ $value_key ] = $value;
243
+				$new_values[$value_key] = $value;
244 244
 			}
245 245
 		}
246 246
 
@@ -323,15 +323,15 @@  discard block
 block discarded – undo
323 323
 		$existing_keys = array_keys( $values['item_meta'] );
324 324
 		foreach ( $all_fields as $fid ) {
325 325
 			if ( ! in_array( $fid->id, $existing_keys ) && ( isset( $values['frm_fields_submitted'] ) && in_array( $fid->id, $values['frm_fields_submitted'] ) ) || isset( $values['options'] ) ) {
326
-				$values['item_meta'][ $fid->id ] = '';
326
+				$values['item_meta'][$fid->id] = '';
327 327
 			}
328
-			$field_array[ $fid->id ] = $fid;
328
+			$field_array[$fid->id] = $fid;
329 329
 		}
330 330
 		unset( $all_fields );
331 331
 
332 332
 		foreach ( $values['item_meta'] as $field_id => $default_value ) {
333
-			if ( isset( $field_array[ $field_id ] ) ) {
334
-				$field = $field_array[ $field_id ];
333
+			if ( isset( $field_array[$field_id] ) ) {
334
+				$field = $field_array[$field_id];
335 335
 			} else {
336 336
 				$field = FrmField::getOne( $field_id );
337 337
 			}
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 				continue;
341 341
 			}
342 342
 
343
-			$is_settings_page = ( isset( $values['options'] ) || isset( $values['field_options'][ 'custom_html_' . $field_id ] ) );
343
+			$is_settings_page = ( isset( $values['options'] ) || isset( $values['field_options']['custom_html_' . $field_id] ) );
344 344
 			if ( $is_settings_page ) {
345 345
 				self::get_settings_page_html( $values, $field );
346 346
 
@@ -355,22 +355,22 @@  discard block
 block discarded – undo
355 355
 			$update_options = apply_filters( 'frm_field_options_to_update', $update_options );
356 356
 
357 357
 			foreach ( $update_options as $opt => $default ) {
358
-				$field->field_options[ $opt ] = isset( $values['field_options'][ $opt . '_' . $field_id ] ) ? $values['field_options'][ $opt . '_' . $field_id ] : $default;
359
-				self::sanitize_field_opt( $opt, $field->field_options[ $opt ] );
358
+				$field->field_options[$opt] = isset( $values['field_options'][$opt . '_' . $field_id] ) ? $values['field_options'][$opt . '_' . $field_id] : $default;
359
+				self::sanitize_field_opt( $opt, $field->field_options[$opt] );
360 360
 			}
361 361
 
362 362
 			$field->field_options = apply_filters( 'frm_update_field_options', $field->field_options, $field, $values );
363 363
 
364 364
 			$new_field = array(
365 365
 				'field_options' => $field->field_options,
366
-				'default_value' => isset( $values[ 'default_value_' . $field_id ] ) ? FrmAppHelper::maybe_json_encode( $values[ 'default_value_' . $field_id ] ) : '',
366
+				'default_value' => isset( $values['default_value_' . $field_id] ) ? FrmAppHelper::maybe_json_encode( $values['default_value_' . $field_id] ) : '',
367 367
 			);
368 368
 
369
-			if ( ! FrmAppHelper::allow_unfiltered_html() && isset( $values['field_options'][ 'options_' . $field_id ] ) && is_array( $values['field_options'][ 'options_' . $field_id ] ) ) {
370
-				foreach ( $values['field_options'][ 'options_' . $field_id ] as $option_key => $option ) {
369
+			if ( ! FrmAppHelper::allow_unfiltered_html() && isset( $values['field_options']['options_' . $field_id] ) && is_array( $values['field_options']['options_' . $field_id] ) ) {
370
+				foreach ( $values['field_options']['options_' . $field_id] as $option_key => $option ) {
371 371
 					if ( is_array( $option ) ) {
372 372
 						foreach ( $option as $key => $item ) {
373
-							$values['field_options'][ 'options_' . $field_id ][ $option_key ][ $key ] = FrmAppHelper::kses( $item, 'all' );
373
+							$values['field_options']['options_' . $field_id][$option_key][$key] = FrmAppHelper::kses( $item, 'all' );
374 374
 						}
375 375
 					}
376 376
 				}
@@ -400,8 +400,8 @@  discard block
 block discarded – undo
400 400
 	 */
401 401
 	private static function maybe_update_max_option( $field, $values, &$new_field ) {
402 402
 		if ( $field->type === 'textarea' &&
403
-			! empty( $values['field_options'][ 'type_' . $field->id ] ) &&
404
-			in_array( $values['field_options'][ 'type_' . $field->id ], array( 'text', 'email', 'url', 'password', 'phone' ), true ) ) {
403
+			! empty( $values['field_options']['type_' . $field->id] ) &&
404
+			in_array( $values['field_options']['type_' . $field->id], array( 'text', 'email', 'url', 'password', 'phone' ), true ) ) {
405 405
 
406 406
 			$new_field['field_options']['max'] = '';
407 407
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 			 * Update posted field setting so that new 'max' option is displayed after form is saved and page reloads.
410 410
 			 * FrmFieldsHelper::fill_default_field_opts populates field options by calling self::get_posted_field_setting.
411 411
 			 */
412
-			$_POST['field_options'][ 'max_' . $field->id ] = '';
412
+			$_POST['field_options']['max_' . $field->id] = '';
413 413
 		}
414 414
 	}
415 415
 
@@ -484,11 +484,11 @@  discard block
 block discarded – undo
484 484
 	 * Updating the settings page
485 485
 	 */
486 486
 	private static function get_settings_page_html( $values, &$field ) {
487
-		if ( isset( $values['field_options'][ 'custom_html_' . $field->id ] ) ) {
487
+		if ( isset( $values['field_options']['custom_html_' . $field->id] ) ) {
488 488
 			$prev_opts     = array();
489 489
 			$fallback_html = isset( $field->field_options['custom_html'] ) ? $field->field_options['custom_html'] : FrmFieldsHelper::get_default_html( $field->type );
490 490
 
491
-			$field->field_options['custom_html'] = isset( $values['field_options'][ 'custom_html_' . $field->id ] ) ? $values['field_options'][ 'custom_html_' . $field->id ] : $fallback_html;
491
+			$field->field_options['custom_html'] = isset( $values['field_options']['custom_html_' . $field->id] ) ? $values['field_options']['custom_html_' . $field->id] : $fallback_html;
492 492
 		} elseif ( $field->type == 'hidden' || $field->type == 'user_id' ) {
493 493
 			$prev_opts = $field->field_options;
494 494
 		}
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 		foreach ( $field_cols as $col => $default ) {
515 515
 			$default = ( $default === '' ) ? $field->{$col} : $default;
516 516
 
517
-			$new_field[ $col ] = isset( $values['field_options'][ $col . '_' . $field->id ] ) ? $values['field_options'][ $col . '_' . $field->id ] : $default;
517
+			$new_field[$col] = isset( $values['field_options'][$col . '_' . $field->id] ) ? $values['field_options'][$col . '_' . $field->id] : $default;
518 518
 		}
519 519
 
520 520
 		// Don't save the template option.
@@ -939,8 +939,8 @@  discard block
 block discarded – undo
939 939
 			self::maybe_get_form( $form );
940 940
 		}
941 941
 
942
-		if ( isset( $frm_vars['form_params'] ) && is_array( $frm_vars['form_params'] ) && isset( $frm_vars['form_params'][ $form->id ] ) ) {
943
-			return $frm_vars['form_params'][ $form->id ];
942
+		if ( isset( $frm_vars['form_params'] ) && is_array( $frm_vars['form_params'] ) && isset( $frm_vars['form_params'][$form->id] ) ) {
943
+			return $frm_vars['form_params'][$form->id];
944 944
 		}
945 945
 
946 946
 		$action_var = isset( $_REQUEST['frm_action'] ) ? 'frm_action' : 'action'; // phpcs:ignore WordPress.Security.NonceVerification.Missing
@@ -969,15 +969,15 @@  discard block
 block discarded – undo
969 969
 			// If there are two forms on the same page, make sure not to submit both.
970 970
 			foreach ( $default_values as $var => $default ) {
971 971
 				if ( $var == 'action' ) {
972
-					$values[ $var ] = FrmAppHelper::get_param( $action_var, $default, 'get', 'sanitize_title' );
972
+					$values[$var] = FrmAppHelper::get_param( $action_var, $default, 'get', 'sanitize_title' );
973 973
 				} else {
974
-					$values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
974
+					$values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
975 975
 				}
976 976
 				unset( $var, $default );
977 977
 			}
978 978
 		} else {
979 979
 			foreach ( $default_values as $var => $default ) {
980
-				$values[ $var ] = $default;
980
+				$values[$var] = $default;
981 981
 				unset( $var, $default );
982 982
 			}
983 983
 		}
@@ -1003,7 +1003,7 @@  discard block
 block discarded – undo
1003 1003
 			'sdir'     => '',
1004 1004
 		);
1005 1005
 		foreach ( $defaults as $var => $default ) {
1006
-			$values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
1006
+			$values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
1007 1007
 		}
1008 1008
 
1009 1009
 		return $values;
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
 			'keep_post' => '',
1032 1032
 		);
1033 1033
 		foreach ( $defaults as $var => $default ) {
1034
-			$values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
1034
+			$values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' );
1035 1035
 		}
1036 1036
 
1037 1037
 		return $values;
@@ -1134,7 +1134,7 @@  discard block
 block discarded – undo
1134 1134
 		$form = $atts['form'];
1135 1135
 		$default = isset( $atts['default'] ) ? $atts['default'] : '';
1136 1136
 
1137
-		return isset( $form->options[ $atts['option'] ] ) ? $form->options[ $atts['option'] ] : $default;
1137
+		return isset( $form->options[$atts['option']] ) ? $form->options[$atts['option']] : $default;
1138 1138
 	}
1139 1139
 
1140 1140
 	/**
Please login to merge, or discard this patch.
classes/models/FrmFormAction.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -208,9 +208,9 @@  discard block
 block discarded – undo
208 208
 		$groups = FrmFormActionsController::form_action_groups();
209 209
 		$group  = 'misc';
210 210
 
211
-		if ( isset( $action_options['group'] ) && isset( $groups[ $action_options['group'] ] ) ) {
211
+		if ( isset( $action_options['group'] ) && isset( $groups[$action_options['group']] ) ) {
212 212
 			$group = $action_options['group'];
213
-		} elseif ( isset( $groups[ $this->id_base ] ) ) {
213
+		} elseif ( isset( $groups[$this->id_base] ) ) {
214 214
 			$group = $this->id_base;
215 215
 		} else {
216 216
 			foreach ( $groups as $name => $check_group ) {
@@ -221,8 +221,8 @@  discard block
 block discarded – undo
221 221
 			}
222 222
 		}
223 223
 
224
-		$groups[ $group ]['id'] = $group;
225
-		return $groups[ $group ];
224
+		$groups[$group]['id'] = $group;
225
+		return $groups[$group];
226 226
 	}
227 227
 
228 228
 	/**
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 	 * @return integer $post_id
334 334
 	 */
335 335
 	public function maybe_create_action( $action, $forms ) {
336
-		if ( isset( $action['ID'] ) && is_numeric( $action['ID'] ) && isset( $forms[ $action['menu_order'] ] ) && $forms[ $action['menu_order'] ] == 'updated' ) {
336
+		if ( isset( $action['ID'] ) && is_numeric( $action['ID'] ) && isset( $forms[$action['menu_order']] ) && $forms[$action['menu_order']] == 'updated' ) {
337 337
 			// Update action only
338 338
 			$action['post_content'] = FrmAppHelper::maybe_json_decode( $action['post_content'] );
339 339
 			$post_id                = $this->save_settings( $action );
@@ -356,18 +356,18 @@  discard block
 block discarded – undo
356 356
 		$switch             = $this->get_global_switch_fields();
357 357
 
358 358
 		foreach ( (array) $action->post_content as $key => $val ) {
359
-			if ( is_numeric( $val ) && isset( $frm_duplicate_ids[ $val ] ) ) {
360
-				$action->post_content[ $key ] = $frm_duplicate_ids[ $val ];
359
+			if ( is_numeric( $val ) && isset( $frm_duplicate_ids[$val] ) ) {
360
+				$action->post_content[$key] = $frm_duplicate_ids[$val];
361 361
 			} elseif ( ! is_array( $val ) ) {
362
-				$action->post_content[ $key ] = FrmFieldsHelper::switch_field_ids( $val );
363
-			} elseif ( isset( $switch[ $key ] ) && is_array( $switch[ $key ] ) ) {
362
+				$action->post_content[$key] = FrmFieldsHelper::switch_field_ids( $val );
363
+			} elseif ( isset( $switch[$key] ) && is_array( $switch[$key] ) ) {
364 364
 				// loop through each value if empty
365
-				if ( empty( $switch[ $key ] ) ) {
366
-					$switch[ $key ] = array_keys( $val );
365
+				if ( empty( $switch[$key] ) ) {
366
+					$switch[$key] = array_keys( $val );
367 367
 				}
368 368
 
369
-				foreach ( $switch[ $key ] as $subkey ) {
370
-					$action->post_content[ $key ] = $this->duplicate_array_walk( $action->post_content[ $key ], $subkey, $val );
369
+				foreach ( $switch[$key] as $subkey ) {
370
+					$action->post_content[$key] = $this->duplicate_array_walk( $action->post_content[$key], $subkey, $val );
371 371
 				}
372 372
 			}
373 373
 
@@ -385,20 +385,20 @@  discard block
 block discarded – undo
385 385
 			foreach ( $subkey as $subkey2 ) {
386 386
 				foreach ( (array) $val as $ck => $cv ) {
387 387
 					if ( is_array( $cv ) ) {
388
-						$action[ $ck ] = $this->duplicate_array_walk( $action[ $ck ], $subkey2, $cv );
389
-					} elseif ( isset( $cv[ $subkey ] ) && is_numeric( $cv[ $subkey ] ) && isset( $frm_duplicate_ids[ $cv[ $subkey ] ] ) ) {
390
-						$action[ $ck ][ $subkey ] = $frm_duplicate_ids[ $cv[ $subkey ] ];
388
+						$action[$ck] = $this->duplicate_array_walk( $action[$ck], $subkey2, $cv );
389
+					} elseif ( isset( $cv[$subkey] ) && is_numeric( $cv[$subkey] ) && isset( $frm_duplicate_ids[$cv[$subkey]] ) ) {
390
+						$action[$ck][$subkey] = $frm_duplicate_ids[$cv[$subkey]];
391 391
 					}
392 392
 				}
393 393
 			}
394 394
 		} else {
395 395
 			foreach ( (array) $val as $ck => $cv ) {
396 396
 				if ( is_array( $cv ) ) {
397
-					$action[ $ck ] = $this->duplicate_array_walk( $action[ $ck ], $subkey, $cv );
398
-				} elseif ( $ck == $subkey && isset( $frm_duplicate_ids[ $cv ] ) ) {
399
-					$action[ $ck ] = $frm_duplicate_ids[ $cv ];
397
+					$action[$ck] = $this->duplicate_array_walk( $action[$ck], $subkey, $cv );
398
+				} elseif ( $ck == $subkey && isset( $frm_duplicate_ids[$cv] ) ) {
399
+					$action[$ck] = $frm_duplicate_ids[$cv];
400 400
 				} elseif ( $ck == $subkey ) {
401
-					$action[ $ck ] = $this->maybe_switch_field_ids( $action[ $ck ] );
401
+					$action[$ck] = $this->maybe_switch_field_ids( $action[$ck] );
402 402
 				}
403 403
 			}
404 404
 		}
@@ -422,10 +422,10 @@  discard block
 block discarded – undo
422 422
 		}
423 423
 
424 424
 		// phpcs:ignore WordPress.Security.NonceVerification.Missing
425
-		if ( isset( $_POST[ $this->option_name ] ) && is_array( $_POST[ $this->option_name ] ) ) {
425
+		if ( isset( $_POST[$this->option_name] ) && is_array( $_POST[$this->option_name] ) ) {
426 426
 			// Sanitizing removes scripts and <email> type of values.
427 427
 			// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
428
-			$settings = wp_unslash( $_POST[ $this->option_name ] );
428
+			$settings = wp_unslash( $_POST[$this->option_name] );
429 429
 		} else {
430 430
 			return;
431 431
 		}
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 		foreach ( $settings as $number => $new_instance ) {
436 436
 			$this->_set( $number );
437 437
 
438
-			$old_instance = isset( $all_instances[ $number ] ) ? $all_instances[ $number ] : array();
438
+			$old_instance = isset( $all_instances[$number] ) ? $all_instances[$number] : array();
439 439
 
440 440
 			if ( ! isset( $new_instance['post_status'] ) ) {
441 441
 				$new_instance['post_status'] = 'draft';
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 			$instance['post_content'] = apply_filters( 'frm_before_save_' . $this->id_base . '_action', $instance['post_content'], $instance, $new_instance, $old_instance, $this );
474 474
 
475 475
 			if ( false !== $instance ) {
476
-				$all_instances[ $number ] = $instance;
476
+				$all_instances[$number] = $instance;
477 477
 			}
478 478
 
479 479
 			$action_ids[] = $this->save_settings( $instance );
@@ -555,12 +555,12 @@  discard block
 block discarded – undo
555 555
 			// some plugins/themes are formatting the post_excerpt
556 556
 			$action->post_excerpt = sanitize_title( $action->post_excerpt );
557 557
 
558
-			if ( ! isset( $action_controls[ $action->post_excerpt ] ) ) {
558
+			if ( ! isset( $action_controls[$action->post_excerpt] ) ) {
559 559
 				continue;
560 560
 			}
561 561
 
562
-			$action                  = $action_controls[ $action->post_excerpt ]->prepare_action( $action );
563
-			$settings[ $action->ID ] = $action;
562
+			$action                  = $action_controls[$action->post_excerpt]->prepare_action( $action );
563
+			$settings[$action->ID] = $action;
564 564
 
565 565
 			if ( count( $settings ) >= $limit ) {
566 566
 				break;
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 			'limit'       => 99,
594 594
 			'post_status' => $default_status,
595 595
 		);
596
-		$args     = wp_parse_args( $args, $defaults );
596
+		$args = wp_parse_args( $args, $defaults );
597 597
 	}
598 598
 
599 599
 	/**
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 
660 660
 			$action = $this->prepare_action( $action );
661 661
 
662
-			$settings[ $action->ID ] = $action;
662
+			$settings[$action->ID] = $action;
663 663
 		}
664 664
 
665 665
 		if ( 1 === $limit ) {
@@ -702,10 +702,10 @@  discard block
 block discarded – undo
702 702
 
703 703
 		foreach ( $default_values as $k => $vals ) {
704 704
 			if ( is_array( $vals ) && ! empty( $vals ) ) {
705
-				if ( 'event' === $k && ! $this->action_options['force_event'] && ! empty( $action->post_content[ $k ] ) ) {
705
+				if ( 'event' === $k && ! $this->action_options['force_event'] && ! empty( $action->post_content[$k] ) ) {
706 706
 					continue;
707 707
 				}
708
-				$action->post_content[ $k ] = wp_parse_args( $action->post_content[ $k ], $vals );
708
+				$action->post_content[$k] = wp_parse_args( $action->post_content[$k], $vals );
709 709
 			}
710 710
 		}
711 711
 
@@ -788,14 +788,14 @@  discard block
 block discarded – undo
788 788
 	 * Migrate settings from form->options into new action.
789 789
 	 */
790 790
 	public function migrate_to_2( $form, $update = 'update' ) {
791
-		$action        = $this->prepare_new( $form->id );
791
+		$action = $this->prepare_new( $form->id );
792 792
 		FrmAppHelper::unserialize_or_decode( $form->options );
793 793
 
794 794
 		// fill with existing options
795 795
 		foreach ( $action->post_content as $name => $val ) {
796
-			if ( isset( $form->options[ $name ] ) ) {
797
-				$action->post_content[ $name ] = $form->options[ $name ];
798
-				unset( $form->options[ $name ] );
796
+			if ( isset( $form->options[$name] ) ) {
797
+				$action->post_content[$name] = $form->options[$name];
798
+				unset( $form->options[$name] );
799 799
 			}
800 800
 		}
801 801
 
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
 				$stop = $stop ? false : true;
862 862
 			}
863 863
 
864
-			$met[ $stop ] = $stop;
864
+			$met[$stop] = $stop;
865 865
 		}
866 866
 
867 867
 		if ( $notification['conditions']['any_all'] == 'all' && ! empty( $met ) && isset( $met[0] ) && isset( $met[1] ) ) {
@@ -915,8 +915,8 @@  discard block
 block discarded – undo
915 915
 	private static function get_value_from_entry( $entry, $field_id ) {
916 916
 		$observed_value = '';
917 917
 
918
-		if ( isset( $entry->metas[ $field_id ] ) ) {
919
-			$observed_value = $entry->metas[ $field_id ];
918
+		if ( isset( $entry->metas[$field_id] ) ) {
919
+			$observed_value = $entry->metas[$field_id];
920 920
 		} elseif ( $entry->post_id && FrmAppHelper::pro_is_installed() ) {
921 921
 			$field          = FrmField::getOne( $field_id );
922 922
 			$observed_value = FrmProEntryMetaHelper::get_post_or_meta_value(
Please login to merge, or discard this patch.