Completed
Push — master ( 4f7493...95e011 )
by
unknown
23s queued 13s
created
classes/helpers/FrmAppHelper.php 1 patch
Spacing   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 			'fill'   => '#4d4d4d',
225 225
 			'orange' => '#f05a24',
226 226
 		);
227
-		$atts     = array_merge( $defaults, $atts );
227
+		$atts = array_merge( $defaults, $atts );
228 228
 
229 229
 		return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 599.68 601.37" width="' . esc_attr( $atts['width'] ) . '" height="' . esc_attr( $atts['height'] ) . '">
230 230
 			<path fill="' . esc_attr( $atts['orange'] ) . '" d="M289.6 384h140v76h-140z"/>
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 	 * @return string
476 476
 	 */
477 477
 	public static function get_server_value( $value ) {
478
-		return isset( $_SERVER[ $value ] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[ $value ] ) ) : '';
478
+		return isset( $_SERVER[$value] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[$value] ) ) : '';
479 479
 	}
480 480
 
481 481
 	/**
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 		$ip         = '';
510 510
 
511 511
 		foreach ( $ip_options as $key ) {
512
-			if ( ! isset( $_SERVER[ $key ] ) ) {
512
+			if ( ! isset( $_SERVER[$key] ) ) {
513 513
 				continue;
514 514
 			}
515 515
 
@@ -578,10 +578,10 @@  discard block
 block discarded – undo
578 578
 		}
579 579
 
580 580
 		if ( $src === 'get' ) {
581
-			$value = isset( $_POST[ $param ] ) ? wp_unslash( $_POST[ $param ] ) : ( isset( $_GET[ $param ] ) ? wp_unslash( $_GET[ $param ] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
582
-			if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
581
+			$value = isset( $_POST[$param] ) ? wp_unslash( $_POST[$param] ) : ( isset( $_GET[$param] ) ? wp_unslash( $_GET[$param] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
582
+			if ( ! isset( $_POST[$param] ) && isset( $_GET[$param] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
583 583
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
584
-				$value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) );
584
+				$value = htmlspecialchars_decode( wp_unslash( $_GET[$param] ) );
585 585
 			}
586 586
 			self::sanitize_value( $sanitize, $value );
587 587
 		} else {
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
 				}
603 603
 
604 604
 				$p     = trim( $p, ']' );
605
-				$value = isset( $value[ $p ] ) ? $value[ $p ] : $default;
605
+				$value = isset( $value[$p] ) ? $value[$p] : $default;
606 606
 			}
607 607
 		}
608 608
 
@@ -667,26 +667,26 @@  discard block
 block discarded – undo
667 667
 			'sanitize'   => 'sanitize_text_field',
668 668
 			'serialized' => false,
669 669
 		);
670
-		$args     = wp_parse_args( $args, $defaults );
670
+		$args = wp_parse_args( $args, $defaults );
671 671
 
672 672
 		$value = $args['default'];
673 673
 		if ( $args['type'] === 'get' ) {
674
-			if ( $_GET && isset( $_GET[ $args['param'] ] ) ) {
674
+			if ( $_GET && isset( $_GET[$args['param']] ) ) {
675 675
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
676
-				$value = wp_unslash( $_GET[ $args['param'] ] );
676
+				$value = wp_unslash( $_GET[$args['param']] );
677 677
 			}
678 678
 		} elseif ( $args['type'] === 'post' ) {
679
-			if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
679
+			if ( isset( $_POST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
680 680
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
681
-				$value = wp_unslash( $_POST[ $args['param'] ] );
681
+				$value = wp_unslash( $_POST[$args['param']] );
682 682
 				if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) {
683 683
 					self::unserialize_or_decode( $value );
684 684
 				}
685 685
 			}
686
-		} elseif ( isset( $_REQUEST[ $args['param'] ] ) ) {
686
+		} elseif ( isset( $_REQUEST[$args['param']] ) ) {
687 687
 			// phpcs:ignore WordPress.Security.NonceVerification.Missing
688 688
 				// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
689
-				$value = wp_unslash( $_REQUEST[ $args['param'] ] );
689
+				$value = wp_unslash( $_REQUEST[$args['param']] );
690 690
 		}
691 691
 
692 692
 		self::sanitize_value( $args['sanitize'], $value );
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
 		if ( is_array( $value ) ) {
734 734
 			$temp_values = $value;
735 735
 			foreach ( $temp_values as $k => $v ) {
736
-				self::sanitize_value( $sanitize, $value[ $k ] );
736
+				self::sanitize_value( $sanitize, $value[$k] );
737 737
 			}
738 738
 			return;
739 739
 		}
@@ -744,8 +744,8 @@  discard block
 block discarded – undo
744 744
 	public static function sanitize_request( $sanitize_method, &$values ) {
745 745
 		$temp_values = $values;
746 746
 		foreach ( $temp_values as $k => $val ) {
747
-			if ( isset( $sanitize_method[ $k ] ) ) {
748
-				$values[ $k ] = call_user_func( $sanitize_method[ $k ], $val );
747
+			if ( isset( $sanitize_method[$k] ) ) {
748
+				$values[$k] = call_user_func( $sanitize_method[$k], $val );
749 749
 			}
750 750
 		}
751 751
 	}
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 		if ( is_array( $value ) ) {
806 806
 			$temp_values = $value;
807 807
 			foreach ( $temp_values as $k => $v ) {
808
-				self::decode_specialchars( $value[ $k ] );
808
+				self::decode_specialchars( $value[$k] );
809 809
 			}
810 810
 		} else {
811 811
 			self::decode_amp( $value );
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
 	 * @return array
928 928
 	 */
929 929
 	public static function add_allowed_submit_button_tags( $allowed_html ) {
930
-		$allowed_html['input']                    = array(
930
+		$allowed_html['input'] = array(
931 931
 			'type'           => true,
932 932
 			'value'          => true,
933 933
 			'formnovalidate' => true,
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
 			$allowed_html = $html;
951 951
 		} elseif ( ! empty( $allowed ) ) {
952 952
 			foreach ( (array) $allowed as $a ) {
953
-				$allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array();
953
+				$allowed_html[$a] = isset( $html[$a] ) ? $html[$a] : array();
954 954
 			}
955 955
 		}
956 956
 
@@ -1129,8 +1129,8 @@  discard block
 block discarded – undo
1129 1129
 		}
1130 1130
 
1131 1131
 		global $wp_query;
1132
-		if ( isset( $wp_query->query_vars[ $param ] ) ) {
1133
-			$value = $wp_query->query_vars[ $param ];
1132
+		if ( isset( $wp_query->query_vars[$param] ) ) {
1133
+			$value = $wp_query->query_vars[$param];
1134 1134
 		}
1135 1135
 
1136 1136
 		return $value;
@@ -1161,9 +1161,9 @@  discard block
 block discarded – undo
1161 1161
 			'frm_keyalt_icon'       => 'frm_key_icon',
1162 1162
 			'frm_keyalt_solid_icon' => 'frm_key_solid_icon',
1163 1163
 		);
1164
-		if ( isset( $deprecated[ $icon ] ) ) {
1165
-			$icon  = $deprecated[ $icon ];
1166
-			$class = str_replace( $icon, $deprecated[ $icon ], $class );
1164
+		if ( isset( $deprecated[$icon] ) ) {
1165
+			$icon  = $deprecated[$icon];
1166
+			$class = str_replace( $icon, $deprecated[$icon], $class );
1167 1167
 		}
1168 1168
 
1169 1169
 		if ( $icon === $class ) {
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
 	 * @return string|void
1286 1286
 	 */
1287 1287
 	public static function array_to_html_params( $atts, $echo = false ) {
1288
-		$callback = function () use ( $atts ) {
1288
+		$callback = function() use ( $atts ) {
1289 1289
 			if ( $atts ) {
1290 1290
 				foreach ( $atts as $key => $value ) {
1291 1291
 					echo ' ' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"';
@@ -1448,7 +1448,7 @@  discard block
 block discarded – undo
1448 1448
 			'input_id'    => '',
1449 1449
 			'value'       => false,
1450 1450
 		);
1451
-		$atts     = array_merge( $defaults, $atts );
1451
+		$atts = array_merge( $defaults, $atts );
1452 1452
 
1453 1453
 		if ( $atts['input_id'] === 'template' && empty( $atts['tosearch'] ) ) {
1454 1454
 			$atts['tosearch'] = 'frm-card';
@@ -1524,7 +1524,7 @@  discard block
 block discarded – undo
1524 1524
 				'new_file_path' => self::plugin_path() . '/js',
1525 1525
 			)
1526 1526
 		);
1527
-		$new_file  = new FrmCreateFile( $file_atts );
1527
+		$new_file = new FrmCreateFile( $file_atts );
1528 1528
 
1529 1529
 		$files = array(
1530 1530
 			self::plugin_path() . '/js/formidable.min.js',
@@ -1734,8 +1734,8 @@  discard block
 block discarded – undo
1734 1734
 	 */
1735 1735
 	private static function get_dropdown_value_and_label_from_option( $option, $key, $args ) {
1736 1736
 		if ( is_array( $option ) ) {
1737
-			$value = isset( $option[ $args['value_key'] ] ) ? $option[ $args['value_key'] ] : '';
1738
-			$label = isset( $option[ $args['label_key'] ] ) ? $option[ $args['label_key'] ] : '';
1737
+			$value = isset( $option[$args['value_key']] ) ? $option[$args['value_key']] : '';
1738
+			$label = isset( $option[$args['label_key']] ) ? $option[$args['label_key']] : '';
1739 1739
 		} else {
1740 1740
 			$value = $key;
1741 1741
 			$label = $option;
@@ -2118,8 +2118,8 @@  discard block
 block discarded – undo
2118 2118
 			return $error;
2119 2119
 		}
2120 2120
 
2121
-		$nonce_value = $_REQUEST && isset( $_REQUEST[ $nonce_name ] ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $nonce_name ] ) ) : '';
2122
-		if ( $_REQUEST && ( ! isset( $_REQUEST[ $nonce_name ] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) {
2121
+		$nonce_value = $_REQUEST && isset( $_REQUEST[$nonce_name] ) ? sanitize_text_field( wp_unslash( $_REQUEST[$nonce_name] ) ) : '';
2122
+		if ( $_REQUEST && ( ! isset( $_REQUEST[$nonce_name] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) {
2123 2123
 			$frm_settings = self::get_settings();
2124 2124
 			$error        = $frm_settings->admin_permission;
2125 2125
 		}
@@ -2155,7 +2155,7 @@  discard block
 block discarded – undo
2155 2155
 			} else {
2156 2156
 				foreach ( $value as $k => $v ) {
2157 2157
 					if ( ! is_array( $v ) ) {
2158
-						$value[ $k ] = call_user_func( $original_function, $v );
2158
+						$value[$k] = call_user_func( $original_function, $v );
2159 2159
 					}
2160 2160
 				}
2161 2161
 			}
@@ -2196,7 +2196,7 @@  discard block
 block discarded – undo
2196 2196
 			if ( is_array( $value ) ) {
2197 2197
 				$return = array_merge( $return, self::array_flatten( $value, $keys ) );
2198 2198
 			} elseif ( $keys === 'keep' ) {
2199
-					$return[ $key ] = $value;
2199
+					$return[$key] = $value;
2200 2200
 			} else {
2201 2201
 				$return[] = $value;
2202 2202
 			}
@@ -2271,11 +2271,11 @@  discard block
 block discarded – undo
2271 2271
 		}
2272 2272
 
2273 2273
 		$ver = $default;
2274
-		if ( ! isset( $wp_scripts->registered[ $handle ] ) ) {
2274
+		if ( ! isset( $wp_scripts->registered[$handle] ) ) {
2275 2275
 			return $ver;
2276 2276
 		}
2277 2277
 
2278
-		$query = $wp_scripts->registered[ $handle ];
2278
+		$query = $wp_scripts->registered[$handle];
2279 2279
 		if ( is_object( $query ) && ! empty( $query->ver ) ) {
2280 2280
 			$ver = $query->ver;
2281 2281
 		}
@@ -2291,7 +2291,7 @@  discard block
 block discarded – undo
2291 2291
 	 * @return string|null
2292 2292
 	 */
2293 2293
 	public static function js_redirect( $url, $echo = false ) {
2294
-		$callback = function () use ( $url ) {
2294
+		$callback = function() use ( $url ) {
2295 2295
 			echo '<script type="text/javascript">window.location="' . esc_url_raw( $url ) . '"</script>';
2296 2296
 		};
2297 2297
 		return self::clip( $callback, $echo );
@@ -2386,7 +2386,7 @@  discard block
 block discarded – undo
2386 2386
 			$suffix = 2;
2387 2387
 			do {
2388 2388
 				$key_check = $key . $separator . $suffix;
2389
-				++$suffix;
2389
+				++ $suffix;
2390 2390
 			} while ( in_array( $key_check, $similar_keys, true ) );
2391 2391
 
2392 2392
 			$key = $key_check;
@@ -2494,7 +2494,7 @@  discard block
 block discarded – undo
2494 2494
 
2495 2495
 		foreach ( array( 'name', 'description' ) as $var ) {
2496 2496
 			$default_val    = isset( $record->{$var} ) ? $record->{$var} : '';
2497
-			$values[ $var ] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' );
2497
+			$values[$var] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' );
2498 2498
 			unset( $var, $default_val );
2499 2499
 		}
2500 2500
 
@@ -2550,9 +2550,9 @@  discard block
 block discarded – undo
2550 2550
 			$meta_value = FrmEntryMeta::get_meta_value( $record, $field->id );
2551 2551
 		}//end if
2552 2552
 
2553
-		$field_type = isset( $post_values['field_options'][ 'type_' . $field->id ] ) ? $post_values['field_options'][ 'type_' . $field->id ] : $field->type;
2554
-		if ( isset( $post_values['item_meta'][ $field->id ] ) ) {
2555
-			$new_value = $post_values['item_meta'][ $field->id ];
2553
+		$field_type = isset( $post_values['field_options']['type_' . $field->id] ) ? $post_values['field_options']['type_' . $field->id] : $field->type;
2554
+		if ( isset( $post_values['item_meta'][$field->id] ) ) {
2555
+			$new_value = $post_values['item_meta'][$field->id];
2556 2556
 			self::unserialize_or_decode( $new_value );
2557 2557
 		} else {
2558 2558
 			$new_value = $meta_value;
@@ -2573,7 +2573,7 @@  discard block
 block discarded – undo
2573 2573
 
2574 2574
 		$field_array = array_merge( (array) $field->field_options, $field_array );
2575 2575
 
2576
-		$values['fields'][ $field->id ] = $field_array;
2576
+		$values['fields'][$field->id] = $field_array;
2577 2577
 	}
2578 2578
 
2579 2579
 	/**
@@ -2623,11 +2623,11 @@  discard block
 block discarded – undo
2623 2623
 		}
2624 2624
 
2625 2625
 		foreach ( $form->options as $opt => $value ) {
2626
-			if ( isset( $post_values[ $opt ] ) ) {
2627
-				$values[ $opt ] = $post_values[ $opt ];
2628
-				self::unserialize_or_decode( $values[ $opt ] );
2626
+			if ( isset( $post_values[$opt] ) ) {
2627
+				$values[$opt] = $post_values[$opt];
2628
+				self::unserialize_or_decode( $values[$opt] );
2629 2629
 			} else {
2630
-				$values[ $opt ] = $value;
2630
+				$values[$opt] = $value;
2631 2631
 			}
2632 2632
 		}
2633 2633
 
@@ -2641,8 +2641,8 @@  discard block
 block discarded – undo
2641 2641
 		$form_defaults = FrmFormsHelper::get_default_opts();
2642 2642
 
2643 2643
 		foreach ( $form_defaults as $opt => $default ) {
2644
-			if ( ! isset( $values[ $opt ] ) || $values[ $opt ] == '' ) {
2645
-				$values[ $opt ] = $post_values && isset( $post_values['options'][ $opt ] ) ? $post_values['options'][ $opt ] : $default;
2644
+			if ( ! isset( $values[$opt] ) || $values[$opt] == '' ) {
2645
+				$values[$opt] = $post_values && isset( $post_values['options'][$opt] ) ? $post_values['options'][$opt] : $default;
2646 2646
 			}
2647 2647
 
2648 2648
 			unset( $opt, $default );
@@ -2653,8 +2653,8 @@  discard block
 block discarded – undo
2653 2653
 		}
2654 2654
 
2655 2655
 		foreach ( array( 'before', 'after', 'submit' ) as $h ) {
2656
-			if ( ! isset( $values[ $h . '_html' ] ) ) {
2657
-				$values[ $h . '_html' ] = ( isset( $post_values['options'][ $h . '_html' ] ) ? $post_values['options'][ $h . '_html' ] : FrmFormsHelper::get_default_html( $h ) );
2656
+			if ( ! isset( $values[$h . '_html'] ) ) {
2657
+				$values[$h . '_html'] = ( isset( $post_values['options'][$h . '_html'] ) ? $post_values['options'][$h . '_html'] : FrmFormsHelper::get_default_html( $h ) );
2658 2658
 			}
2659 2659
 			unset( $h );
2660 2660
 		}
@@ -2849,25 +2849,25 @@  discard block
 block discarded – undo
2849 2849
 		if ( ! is_numeric( $levels ) ) {
2850 2850
 			// Show time in specified unit.
2851 2851
 			$levels = self::get_unit( $levels );
2852
-			if ( isset( $time_strings[ $levels ] ) ) {
2852
+			if ( isset( $time_strings[$levels] ) ) {
2853 2853
 				$diff         = array(
2854 2854
 					$levels => self::time_format( $levels, $diff ),
2855 2855
 				);
2856 2856
 				$time_strings = array(
2857
-					$levels => $time_strings[ $levels ],
2857
+					$levels => $time_strings[$levels],
2858 2858
 				);
2859 2859
 			}
2860 2860
 			$levels = 1;
2861 2861
 		}
2862 2862
 
2863 2863
 		foreach ( $time_strings as $k => $v ) {
2864
-			if ( isset( $diff[ $k ] ) && $diff[ $k ] ) {
2865
-				$time_strings[ $k ] = $diff[ $k ] . ' ' . ( $diff[ $k ] > 1 ? $v[1] : $v[0] );
2866
-			} elseif ( isset( $diff[ $k ] ) && count( $time_strings ) === 1 ) {
2864
+			if ( isset( $diff[$k] ) && $diff[$k] ) {
2865
+				$time_strings[$k] = $diff[$k] . ' ' . ( $diff[$k] > 1 ? $v[1] : $v[0] );
2866
+			} elseif ( isset( $diff[$k] ) && count( $time_strings ) === 1 ) {
2867 2867
 				// Account for 0.
2868
-				$time_strings[ $k ] = $diff[ $k ] . ' ' . $v[1];
2868
+				$time_strings[$k] = $diff[$k] . ' ' . $v[1];
2869 2869
 			} else {
2870
-				unset( $time_strings[ $k ] );
2870
+				unset( $time_strings[$k] );
2871 2871
 			}
2872 2872
 		}
2873 2873
 
@@ -2886,8 +2886,8 @@  discard block
 block discarded – undo
2886 2886
 			'y' => 'y',
2887 2887
 			'd' => 'days',
2888 2888
 		);
2889
-		if ( isset( $return[ $unit ] ) ) {
2890
-			return $diff[ $return[ $unit ] ];
2889
+		if ( isset( $return[$unit] ) ) {
2890
+			return $diff[$return[$unit]];
2891 2891
 		}
2892 2892
 
2893 2893
 		$total = $diff['days'] * self::convert_time( 'd', $unit );
@@ -2895,11 +2895,11 @@  discard block
 block discarded – undo
2895 2895
 		$times = array( 'h', 'i', 's' );
2896 2896
 
2897 2897
 		foreach ( $times as $time ) {
2898
-			if ( ! isset( $diff[ $time ] ) ) {
2898
+			if ( ! isset( $diff[$time] ) ) {
2899 2899
 				continue;
2900 2900
 			}
2901 2901
 
2902
-			$total += $diff[ $time ] * self::convert_time( $time, $unit );
2902
+			$total += $diff[$time] * self::convert_time( $time, $unit );
2903 2903
 		}
2904 2904
 
2905 2905
 		return floor( $total );
@@ -2919,7 +2919,7 @@  discard block
 block discarded – undo
2919 2919
 			'y' => DAY_IN_SECONDS * 365.25,
2920 2920
 		);
2921 2921
 
2922
-		return $convert[ $from ] / $convert[ $to ];
2922
+		return $convert[$from] / $convert[$to];
2923 2923
 	}
2924 2924
 
2925 2925
 	/**
@@ -2927,7 +2927,7 @@  discard block
 block discarded – undo
2927 2927
 	 */
2928 2928
 	private static function get_unit( $unit ) {
2929 2929
 		$units = self::get_time_strings();
2930
-		if ( isset( $units[ $unit ] ) || is_numeric( $unit ) ) {
2930
+		if ( isset( $units[$unit] ) || is_numeric( $unit ) ) {
2931 2931
 			return $unit;
2932 2932
 		}
2933 2933
 
@@ -3043,17 +3043,17 @@  discard block
 block discarded – undo
3043 3043
 
3044 3044
 					case 1:
3045 3045
 						$l2 = $name;
3046
-						self::add_value_to_array( $name, $l2, $this_val, $vars[ $l1 ] );
3046
+						self::add_value_to_array( $name, $l2, $this_val, $vars[$l1] );
3047 3047
 						break;
3048 3048
 
3049 3049
 					case 2:
3050 3050
 						$l3 = $name;
3051
-						self::add_value_to_array( $name, $l3, $this_val, $vars[ $l1 ][ $l2 ] );
3051
+						self::add_value_to_array( $name, $l3, $this_val, $vars[$l1][$l2] );
3052 3052
 						break;
3053 3053
 
3054 3054
 					case 3:
3055 3055
 						$l4 = $name;
3056
-						self::add_value_to_array( $name, $l4, $this_val, $vars[ $l1 ][ $l2 ][ $l3 ] );
3056
+						self::add_value_to_array( $name, $l4, $this_val, $vars[$l1][$l2][$l3] );
3057 3057
 				}
3058 3058
 
3059 3059
 				unset( $this_val, $n );
@@ -3072,8 +3072,8 @@  discard block
 block discarded – undo
3072 3072
 	public static function add_value_to_array( $name, $l1, $val, &$vars ) {
3073 3073
 		if ( $name == '' ) {
3074 3074
 			$vars[] = $val;
3075
-		} elseif ( ! isset( $vars[ $l1 ] ) ) {
3076
-			$vars[ $l1 ] = $val;
3075
+		} elseif ( ! isset( $vars[$l1] ) ) {
3076
+			$vars[$l1] = $val;
3077 3077
 		}
3078 3078
 	}
3079 3079
 
@@ -3090,7 +3090,7 @@  discard block
 block discarded – undo
3090 3090
 			'new_tab'       => __( 'This option will open the link in a new browser tab. Please note that some popup blockers may prevent this from happening, in which case the link will be displayed.', 'formidable' ),
3091 3091
 		);
3092 3092
 
3093
-		if ( ! isset( $tooltips[ $name ] ) ) {
3093
+		if ( ! isset( $tooltips[$name] ) ) {
3094 3094
 			return;
3095 3095
 		}
3096 3096
 
@@ -3100,7 +3100,7 @@  discard block
 block discarded – undo
3100 3100
 			echo ' class="frm_help"';
3101 3101
 		}
3102 3102
 
3103
-		echo ' title="' . esc_attr( $tooltips[ $name ] );
3103
+		echo ' title="' . esc_attr( $tooltips[$name] );
3104 3104
 
3105 3105
 		if ( 'open' != $class ) {
3106 3106
 			echo '"';
@@ -3159,13 +3159,13 @@  discard block
 block discarded – undo
3159 3159
 	}
3160 3160
 
3161 3161
 	private static function prepare_action_slashes( $val, $key, &$post_content ) {
3162
-		if ( ! isset( $post_content[ $key ] ) || is_numeric( $val ) ) {
3162
+		if ( ! isset( $post_content[$key] ) || is_numeric( $val ) ) {
3163 3163
 			return;
3164 3164
 		}
3165 3165
 
3166 3166
 		if ( is_array( $val ) ) {
3167 3167
 			foreach ( $val as $k1 => $v1 ) {
3168
-				self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] );
3168
+				self::prepare_action_slashes( $v1, $k1, $post_content[$key] );
3169 3169
 				unset( $k1, $v1 );
3170 3170
 			}
3171 3171
 		} else {
@@ -3173,7 +3173,7 @@  discard block
 block discarded – undo
3173 3173
 			$val = stripslashes( $val );
3174 3174
 
3175 3175
 			// Add backslashes before double quotes and forward slashes only
3176
-			$post_content[ $key ] = addcslashes( $val, '"\\/' );
3176
+			$post_content[$key] = addcslashes( $val, '"\\/' );
3177 3177
 		}
3178 3178
 	}
3179 3179
 
@@ -3294,14 +3294,14 @@  discard block
 block discarded – undo
3294 3294
 				continue;
3295 3295
 			}
3296 3296
 			$key = $input['name'];
3297
-			if ( isset( $formatted[ $key ] ) ) {
3298
-				if ( is_array( $formatted[ $key ] ) ) {
3299
-					$formatted[ $key ][] = $input['value'];
3297
+			if ( isset( $formatted[$key] ) ) {
3298
+				if ( is_array( $formatted[$key] ) ) {
3299
+					$formatted[$key][] = $input['value'];
3300 3300
 				} else {
3301
-					$formatted[ $key ] = array( $formatted[ $key ], $input['value'] );
3301
+					$formatted[$key] = array( $formatted[$key], $input['value'] );
3302 3302
 				}
3303 3303
 			} else {
3304
-				$formatted[ $key ] = $input['value'];
3304
+				$formatted[$key] = $input['value'];
3305 3305
 			}
3306 3306
 		}
3307 3307
 
@@ -4009,8 +4009,8 @@  discard block
 block discarded – undo
4009 4009
 		}
4010 4010
 
4011 4011
 		foreach ( $keys as $key ) {
4012
-			if ( isset( $values[ $key ] ) ) {
4013
-				$values[ $key ] = self::kses( $values[ $key ], 'all' );
4012
+			if ( isset( $values[$key] ) ) {
4013
+				$values[$key] = self::kses( $values[$key], 'all' );
4014 4014
 			}
4015 4015
 		}
4016 4016
 
@@ -4075,7 +4075,7 @@  discard block
 block discarded – undo
4075 4075
 				'role',
4076 4076
 				'style',
4077 4077
 			);
4078
-			$safe      = in_array( $key, $safe_keys, true );
4078
+			$safe = in_array( $key, $safe_keys, true );
4079 4079
 		}//end if
4080 4080
 
4081 4081
 		/**
@@ -4214,7 +4214,7 @@  discard block
 block discarded – undo
4214 4214
 			return 0;
4215 4215
 		}
4216 4216
 
4217
-		return strlen( $parts[ count( $parts ) - 1 ] );
4217
+		return strlen( $parts[count( $parts ) - 1] );
4218 4218
 	}
4219 4219
 
4220 4220
 	/**
@@ -4234,7 +4234,7 @@  discard block
 block discarded – undo
4234 4234
 
4235 4235
 		add_filter(
4236 4236
 			'option_gmt_offset',
4237
-			function ( $offset ) {
4237
+			function( $offset ) {
4238 4238
 				if ( ! is_string( $offset ) || is_numeric( $offset ) ) {
4239 4239
 					// Leave a valid value alone.
4240 4240
 					return $offset;
@@ -4331,7 +4331,7 @@  discard block
 block discarded – undo
4331 4331
 			return;
4332 4332
 		}
4333 4333
 
4334
-		$ajax_callback = function () use ( $option ) {
4334
+		$ajax_callback = function() use ( $option ) {
4335 4335
 			self::dismiss_warning_message( $option );
4336 4336
 		};
4337 4337
 
@@ -4341,7 +4341,7 @@  discard block
 block discarded – undo
4341 4341
 
4342 4342
 		add_filter(
4343 4343
 			'frm_message_list',
4344
-			function ( $show_messages ) use ( $message, $option ) {
4344
+			function( $show_messages ) use ( $message, $option ) {
4345 4345
 				if ( get_option( $option, false ) ) {
4346 4346
 					return $show_messages;
4347 4347
 				}
Please login to merge, or discard this patch.