@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | 'fill' => '#4d4d4d', |
| 331 | 331 | 'orange' => '#f05a24', |
| 332 | 332 | ); |
| 333 | - $atts = array_merge( $defaults, $atts ); |
|
| 333 | + $atts = array_merge( $defaults, $atts ); |
|
| 334 | 334 | |
| 335 | 335 | 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'] ) . '"> |
| 336 | 336 | <path fill="' . esc_attr( $atts['orange'] ) . '" d="M289.6 384h140v76h-140z"/> |
@@ -629,7 +629,7 @@ discard block |
||
| 629 | 629 | * @return string |
| 630 | 630 | */ |
| 631 | 631 | public static function get_server_value( $value ) { |
| 632 | - return isset( $_SERVER[ $value ] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[ $value ] ) ) : ''; |
|
| 632 | + return isset( $_SERVER[$value] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[$value] ) ) : ''; |
|
| 633 | 633 | } |
| 634 | 634 | |
| 635 | 635 | /** |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | $ip = ''; |
| 664 | 664 | |
| 665 | 665 | foreach ( $ip_options as $key ) { |
| 666 | - if ( ! isset( $_SERVER[ $key ] ) ) { |
|
| 666 | + if ( ! isset( $_SERVER[$key] ) ) { |
|
| 667 | 667 | continue; |
| 668 | 668 | } |
| 669 | 669 | |
@@ -741,11 +741,11 @@ discard block |
||
| 741 | 741 | } |
| 742 | 742 | |
| 743 | 743 | if ( $src === 'get' ) { |
| 744 | - $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 |
|
| 744 | + $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 |
|
| 745 | 745 | |
| 746 | - if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 746 | + if ( ! isset( $_POST[$param] ) && isset( $_GET[$param] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 747 | 747 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 748 | - $value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) ); |
|
| 748 | + $value = htmlspecialchars_decode( wp_unslash( $_GET[$param] ) ); |
|
| 749 | 749 | } |
| 750 | 750 | self::sanitize_value( $sanitize, $value ); |
| 751 | 751 | } else { |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | } |
| 767 | 767 | |
| 768 | 768 | $p = trim( $p, ']' ); |
| 769 | - $value = $value[ $p ] ?? $default; |
|
| 769 | + $value = $value[$p] ?? $default; |
|
| 770 | 770 | } |
| 771 | 771 | } |
| 772 | 772 | |
@@ -832,28 +832,28 @@ discard block |
||
| 832 | 832 | 'sanitize' => 'sanitize_text_field', |
| 833 | 833 | 'serialized' => false, |
| 834 | 834 | ); |
| 835 | - $args = wp_parse_args( $args, $defaults ); |
|
| 835 | + $args = wp_parse_args( $args, $defaults ); |
|
| 836 | 836 | |
| 837 | 837 | $value = $args['default']; |
| 838 | 838 | |
| 839 | 839 | if ( $args['type'] === 'get' ) { |
| 840 | - if ( $_GET && isset( $_GET[ $args['param'] ] ) ) { |
|
| 840 | + if ( $_GET && isset( $_GET[$args['param']] ) ) { |
|
| 841 | 841 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
| 842 | - $value = wp_unslash( $_GET[ $args['param'] ] ); |
|
| 842 | + $value = wp_unslash( $_GET[$args['param']] ); |
|
| 843 | 843 | } |
| 844 | 844 | } elseif ( $args['type'] === 'post' ) { |
| 845 | - if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 845 | + if ( isset( $_POST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 846 | 846 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
| 847 | - $value = wp_unslash( $_POST[ $args['param'] ] ); |
|
| 847 | + $value = wp_unslash( $_POST[$args['param']] ); |
|
| 848 | 848 | |
| 849 | 849 | if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) { |
| 850 | 850 | self::unserialize_or_decode( $value ); |
| 851 | 851 | } |
| 852 | 852 | } |
| 853 | - } elseif ( isset( $_REQUEST[ $args['param'] ] ) ) { |
|
| 853 | + } elseif ( isset( $_REQUEST[$args['param']] ) ) { |
|
| 854 | 854 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 855 | 855 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 856 | - $value = wp_unslash( $_REQUEST[ $args['param'] ] ); |
|
| 856 | + $value = wp_unslash( $_REQUEST[$args['param']] ); |
|
| 857 | 857 | } |
| 858 | 858 | |
| 859 | 859 | self::sanitize_value( $args['sanitize'], $value ); |
@@ -902,7 +902,7 @@ discard block |
||
| 902 | 902 | $temp_values = $value; |
| 903 | 903 | |
| 904 | 904 | foreach ( $temp_values as $k => $v ) { |
| 905 | - self::sanitize_value( $sanitize, $value[ $k ] ); |
|
| 905 | + self::sanitize_value( $sanitize, $value[$k] ); |
|
| 906 | 906 | } |
| 907 | 907 | |
| 908 | 908 | return; |
@@ -921,8 +921,8 @@ discard block |
||
| 921 | 921 | $temp_values = $values; |
| 922 | 922 | |
| 923 | 923 | foreach ( $temp_values as $k => $val ) { |
| 924 | - if ( isset( $sanitize_method[ $k ] ) ) { |
|
| 925 | - $values[ $k ] = call_user_func( $sanitize_method[ $k ], $val ); |
|
| 924 | + if ( isset( $sanitize_method[$k] ) ) { |
|
| 925 | + $values[$k] = call_user_func( $sanitize_method[$k], $val ); |
|
| 926 | 926 | } |
| 927 | 927 | } |
| 928 | 928 | } |
@@ -986,7 +986,7 @@ discard block |
||
| 986 | 986 | $temp_values = $value; |
| 987 | 987 | |
| 988 | 988 | foreach ( $temp_values as $k => $v ) { |
| 989 | - self::decode_specialchars( $value[ $k ] ); |
|
| 989 | + self::decode_specialchars( $value[$k] ); |
|
| 990 | 990 | } |
| 991 | 991 | } else { |
| 992 | 992 | self::decode_amp( $value ); |
@@ -1129,7 +1129,7 @@ discard block |
||
| 1129 | 1129 | * @return array |
| 1130 | 1130 | */ |
| 1131 | 1131 | public static function add_allowed_submit_button_tags( $allowed_html ) { |
| 1132 | - $allowed_html['input'] = array( |
|
| 1132 | + $allowed_html['input'] = array( |
|
| 1133 | 1133 | 'type' => true, |
| 1134 | 1134 | 'value' => true, |
| 1135 | 1135 | 'formnovalidate' => true, |
@@ -1157,7 +1157,7 @@ discard block |
||
| 1157 | 1157 | $allowed_html = $html; |
| 1158 | 1158 | } elseif ( $allowed ) { |
| 1159 | 1159 | foreach ( (array) $allowed as $a ) { |
| 1160 | - $allowed_html[ $a ] = $html[ $a ] ?? array(); |
|
| 1160 | + $allowed_html[$a] = $html[$a] ?? array(); |
|
| 1161 | 1161 | } |
| 1162 | 1162 | } |
| 1163 | 1163 | |
@@ -1349,8 +1349,8 @@ discard block |
||
| 1349 | 1349 | |
| 1350 | 1350 | global $wp_query; |
| 1351 | 1351 | |
| 1352 | - if ( isset( $wp_query->query_vars[ $param ] ) ) { |
|
| 1353 | - $value = $wp_query->query_vars[ $param ]; |
|
| 1352 | + if ( isset( $wp_query->query_vars[$param] ) ) { |
|
| 1353 | + $value = $wp_query->query_vars[$param]; |
|
| 1354 | 1354 | } |
| 1355 | 1355 | |
| 1356 | 1356 | return $value; |
@@ -1384,9 +1384,9 @@ discard block |
||
| 1384 | 1384 | 'frm_keyalt_solid_icon' => 'frm_key_solid_icon', |
| 1385 | 1385 | ); |
| 1386 | 1386 | |
| 1387 | - if ( isset( $deprecated[ $icon ] ) ) { |
|
| 1388 | - $icon = $deprecated[ $icon ]; |
|
| 1389 | - $class = str_replace( $icon, $deprecated[ $icon ], $class ); |
|
| 1387 | + if ( isset( $deprecated[$icon] ) ) { |
|
| 1388 | + $icon = $deprecated[$icon]; |
|
| 1389 | + $class = str_replace( $icon, $deprecated[$icon], $class ); |
|
| 1390 | 1390 | } |
| 1391 | 1391 | |
| 1392 | 1392 | if ( $icon === $class ) { |
@@ -1520,7 +1520,7 @@ discard block |
||
| 1520 | 1520 | * @return string|void |
| 1521 | 1521 | */ |
| 1522 | 1522 | public static function array_to_html_params( $atts, $echo = false ) { |
| 1523 | - $callback = function () use ( $atts ) { |
|
| 1523 | + $callback = function() use ( $atts ) { |
|
| 1524 | 1524 | if ( $atts ) { |
| 1525 | 1525 | foreach ( $atts as $key => $value ) { |
| 1526 | 1526 | echo ' ' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"'; |
@@ -1709,7 +1709,7 @@ discard block |
||
| 1709 | 1709 | 'value' => false, |
| 1710 | 1710 | 'class' => '', |
| 1711 | 1711 | ); |
| 1712 | - $atts = array_merge( $defaults, $atts ); |
|
| 1712 | + $atts = array_merge( $defaults, $atts ); |
|
| 1713 | 1713 | |
| 1714 | 1714 | if ( $atts['input_id'] === 'template' && empty( $atts['tosearch'] ) ) { |
| 1715 | 1715 | $atts['tosearch'] = 'frm-card'; |
@@ -1789,7 +1789,7 @@ discard block |
||
| 1789 | 1789 | 'new_file_path' => self::plugin_path() . '/js', |
| 1790 | 1790 | ) |
| 1791 | 1791 | ); |
| 1792 | - $new_file = new FrmCreateFile( $file_atts ); |
|
| 1792 | + $new_file = new FrmCreateFile( $file_atts ); |
|
| 1793 | 1793 | |
| 1794 | 1794 | $files = array( |
| 1795 | 1795 | self::plugin_path() . '/js/formidable.min.js', |
@@ -2009,8 +2009,8 @@ discard block |
||
| 2009 | 2009 | */ |
| 2010 | 2010 | private static function get_dropdown_value_and_label_from_option( $option, $key, $args ) { |
| 2011 | 2011 | if ( is_array( $option ) ) { |
| 2012 | - $value = $option[ $args['value_key'] ] ?? ''; |
|
| 2013 | - $label = $option[ $args['label_key'] ] ?? ''; |
|
| 2012 | + $value = $option[$args['value_key']] ?? ''; |
|
| 2013 | + $label = $option[$args['label_key']] ?? ''; |
|
| 2014 | 2014 | } else { |
| 2015 | 2015 | $value = $key; |
| 2016 | 2016 | $label = $option; |
@@ -2418,9 +2418,9 @@ discard block |
||
| 2418 | 2418 | return $error; |
| 2419 | 2419 | } |
| 2420 | 2420 | |
| 2421 | - $nonce_value = $_REQUEST && isset( $_REQUEST[ $nonce_name ] ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $nonce_name ] ) ) : ''; |
|
| 2421 | + $nonce_value = $_REQUEST && isset( $_REQUEST[$nonce_name] ) ? sanitize_text_field( wp_unslash( $_REQUEST[$nonce_name] ) ) : ''; |
|
| 2422 | 2422 | |
| 2423 | - if ( $_REQUEST && ( ! isset( $_REQUEST[ $nonce_name ] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
| 2423 | + if ( $_REQUEST && ( ! isset( $_REQUEST[$nonce_name] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
| 2424 | 2424 | $frm_settings = self::get_settings(); |
| 2425 | 2425 | $error = $frm_settings->admin_permission; |
| 2426 | 2426 | } |
@@ -2473,7 +2473,7 @@ discard block |
||
| 2473 | 2473 | } else { |
| 2474 | 2474 | foreach ( $value as $k => $v ) { |
| 2475 | 2475 | if ( ! is_array( $v ) ) { |
| 2476 | - $value[ $k ] = call_user_func( $original_function, $v ); |
|
| 2476 | + $value[$k] = call_user_func( $original_function, $v ); |
|
| 2477 | 2477 | } |
| 2478 | 2478 | } |
| 2479 | 2479 | } |
@@ -2527,7 +2527,7 @@ discard block |
||
| 2527 | 2527 | if ( is_array( $value ) ) { |
| 2528 | 2528 | $return = array_merge( $return, self::array_flatten( $value, $keys ) ); |
| 2529 | 2529 | } elseif ( $keys === 'keep' ) { |
| 2530 | - $return[ $key ] = $value; |
|
| 2530 | + $return[$key] = $value; |
|
| 2531 | 2531 | } else { |
| 2532 | 2532 | $return[] = $value; |
| 2533 | 2533 | } |
@@ -2620,11 +2620,11 @@ discard block |
||
| 2620 | 2620 | |
| 2621 | 2621 | $ver = $default; |
| 2622 | 2622 | |
| 2623 | - if ( ! isset( $wp_scripts->registered[ $handle ] ) ) { |
|
| 2623 | + if ( ! isset( $wp_scripts->registered[$handle] ) ) { |
|
| 2624 | 2624 | return $ver; |
| 2625 | 2625 | } |
| 2626 | 2626 | |
| 2627 | - $query = $wp_scripts->registered[ $handle ]; |
|
| 2627 | + $query = $wp_scripts->registered[$handle]; |
|
| 2628 | 2628 | |
| 2629 | 2629 | if ( is_object( $query ) && ! empty( $query->ver ) ) { |
| 2630 | 2630 | $ver = $query->ver; |
@@ -2642,7 +2642,7 @@ discard block |
||
| 2642 | 2642 | * @return string|null |
| 2643 | 2643 | */ |
| 2644 | 2644 | public static function js_redirect( $url, $echo = false ) { |
| 2645 | - $callback = function () use ( $url ) { |
|
| 2645 | + $callback = function() use ( $url ) { |
|
| 2646 | 2646 | echo '<script type="text/javascript">window.location="' . esc_url_raw( $url ) . '"</script>'; |
| 2647 | 2647 | }; |
| 2648 | 2648 | return self::clip( $callback, $echo ); |
@@ -2741,7 +2741,7 @@ discard block |
||
| 2741 | 2741 | $suffix = 2; |
| 2742 | 2742 | do { |
| 2743 | 2743 | $key_check = $key . $separator . $suffix; |
| 2744 | - ++$suffix; |
|
| 2744 | + ++ $suffix; |
|
| 2745 | 2745 | } while ( in_array( $key_check, $similar_keys, true ) ); |
| 2746 | 2746 | |
| 2747 | 2747 | $key = $key_check; |
@@ -2860,7 +2860,7 @@ discard block |
||
| 2860 | 2860 | |
| 2861 | 2861 | foreach ( array( 'name', 'description' ) as $var ) { |
| 2862 | 2862 | $default_val = $record->{$var} ?? ''; |
| 2863 | - $values[ $var ] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
| 2863 | + $values[$var] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
| 2864 | 2864 | unset( $var, $default_val ); |
| 2865 | 2865 | } |
| 2866 | 2866 | |
@@ -2933,10 +2933,10 @@ discard block |
||
| 2933 | 2933 | $meta_value = FrmEntryMeta::get_meta_value( $record, $field->id ); |
| 2934 | 2934 | }//end if |
| 2935 | 2935 | |
| 2936 | - $field_type = $post_values['field_options'][ 'type_' . $field->id ] ?? $field->type; |
|
| 2936 | + $field_type = $post_values['field_options']['type_' . $field->id] ?? $field->type; |
|
| 2937 | 2937 | |
| 2938 | - if ( isset( $post_values['item_meta'][ $field->id ] ) ) { |
|
| 2939 | - $new_value = $post_values['item_meta'][ $field->id ]; |
|
| 2938 | + if ( isset( $post_values['item_meta'][$field->id] ) ) { |
|
| 2939 | + $new_value = $post_values['item_meta'][$field->id]; |
|
| 2940 | 2940 | self::unserialize_or_decode( $new_value ); |
| 2941 | 2941 | } else { |
| 2942 | 2942 | $new_value = $meta_value; |
@@ -2957,7 +2957,7 @@ discard block |
||
| 2957 | 2957 | |
| 2958 | 2958 | $field_array = array_merge( (array) $field->field_options, $field_array ); |
| 2959 | 2959 | |
| 2960 | - $values['fields'][ $field->id ] = $field_array; |
|
| 2960 | + $values['fields'][$field->id] = $field_array; |
|
| 2961 | 2961 | } |
| 2962 | 2962 | |
| 2963 | 2963 | /** |
@@ -3007,11 +3007,11 @@ discard block |
||
| 3007 | 3007 | } |
| 3008 | 3008 | |
| 3009 | 3009 | foreach ( $form->options as $opt => $value ) { |
| 3010 | - if ( isset( $post_values[ $opt ] ) ) { |
|
| 3011 | - $values[ $opt ] = $post_values[ $opt ]; |
|
| 3012 | - self::unserialize_or_decode( $values[ $opt ] ); |
|
| 3010 | + if ( isset( $post_values[$opt] ) ) { |
|
| 3011 | + $values[$opt] = $post_values[$opt]; |
|
| 3012 | + self::unserialize_or_decode( $values[$opt] ); |
|
| 3013 | 3013 | } else { |
| 3014 | - $values[ $opt ] = $value; |
|
| 3014 | + $values[$opt] = $value; |
|
| 3015 | 3015 | } |
| 3016 | 3016 | } |
| 3017 | 3017 | |
@@ -3031,8 +3031,8 @@ discard block |
||
| 3031 | 3031 | |
| 3032 | 3032 | foreach ( $form_defaults as $opt => $default ) { |
| 3033 | 3033 | // phpcs:ignore Universal.Operators.StrictComparisons |
| 3034 | - if ( ! isset( $values[ $opt ] ) || $values[ $opt ] == '' ) { |
|
| 3035 | - $values[ $opt ] = $post_values['options'][ $opt ] ?? $default; |
|
| 3034 | + if ( ! isset( $values[$opt] ) || $values[$opt] == '' ) { |
|
| 3035 | + $values[$opt] = $post_values['options'][$opt] ?? $default; |
|
| 3036 | 3036 | } |
| 3037 | 3037 | |
| 3038 | 3038 | unset( $opt, $default ); |
@@ -3043,8 +3043,8 @@ discard block |
||
| 3043 | 3043 | } |
| 3044 | 3044 | |
| 3045 | 3045 | foreach ( array( 'before', 'after', 'submit' ) as $h ) { |
| 3046 | - if ( ! isset( $values[ $h . '_html' ] ) ) { |
|
| 3047 | - $values[ $h . '_html' ] = ( $post_values['options'][ $h . '_html' ] ?? FrmFormsHelper::get_default_html( $h ) ); |
|
| 3046 | + if ( ! isset( $values[$h . '_html'] ) ) { |
|
| 3047 | + $values[$h . '_html'] = ( $post_values['options'][$h . '_html'] ?? FrmFormsHelper::get_default_html( $h ) ); |
|
| 3048 | 3048 | } |
| 3049 | 3049 | unset( $h ); |
| 3050 | 3050 | } |
@@ -3261,12 +3261,12 @@ discard block |
||
| 3261 | 3261 | // Show time in specified unit. |
| 3262 | 3262 | $levels = self::get_unit( $levels ); |
| 3263 | 3263 | |
| 3264 | - if ( isset( $time_strings[ $levels ] ) ) { |
|
| 3264 | + if ( isset( $time_strings[$levels] ) ) { |
|
| 3265 | 3265 | $diff = array( |
| 3266 | 3266 | $levels => self::time_format( $levels, $diff ), |
| 3267 | 3267 | ); |
| 3268 | 3268 | $time_strings = array( |
| 3269 | - $levels => $time_strings[ $levels ], |
|
| 3269 | + $levels => $time_strings[$levels], |
|
| 3270 | 3270 | ); |
| 3271 | 3271 | } |
| 3272 | 3272 | |
@@ -3274,13 +3274,13 @@ discard block |
||
| 3274 | 3274 | } |
| 3275 | 3275 | |
| 3276 | 3276 | foreach ( $time_strings as $k => $v ) { |
| 3277 | - if ( isset( $diff[ $k ] ) && $diff[ $k ] ) { |
|
| 3278 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . ( $diff[ $k ] > 1 ? $v[1] : $v[0] ); |
|
| 3279 | - } elseif ( isset( $diff[ $k ] ) && count( $time_strings ) === 1 ) { |
|
| 3277 | + if ( isset( $diff[$k] ) && $diff[$k] ) { |
|
| 3278 | + $time_strings[$k] = $diff[$k] . ' ' . ( $diff[$k] > 1 ? $v[1] : $v[0] ); |
|
| 3279 | + } elseif ( isset( $diff[$k] ) && count( $time_strings ) === 1 ) { |
|
| 3280 | 3280 | // Account for 0. |
| 3281 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . $v[1]; |
|
| 3281 | + $time_strings[$k] = $diff[$k] . ' ' . $v[1]; |
|
| 3282 | 3282 | } else { |
| 3283 | - unset( $time_strings[ $k ] ); |
|
| 3283 | + unset( $time_strings[$k] ); |
|
| 3284 | 3284 | } |
| 3285 | 3285 | } |
| 3286 | 3286 | |
@@ -3304,8 +3304,8 @@ discard block |
||
| 3304 | 3304 | 'd' => 'days', |
| 3305 | 3305 | ); |
| 3306 | 3306 | |
| 3307 | - if ( isset( $return[ $unit ] ) ) { |
|
| 3308 | - return $diff[ $return[ $unit ] ]; |
|
| 3307 | + if ( isset( $return[$unit] ) ) { |
|
| 3308 | + return $diff[$return[$unit]]; |
|
| 3309 | 3309 | } |
| 3310 | 3310 | |
| 3311 | 3311 | $total = $diff['days'] * self::convert_time( 'd', $unit ); |
@@ -3313,11 +3313,11 @@ discard block |
||
| 3313 | 3313 | $times = array( 'h', 'i', 's' ); |
| 3314 | 3314 | |
| 3315 | 3315 | foreach ( $times as $time ) { |
| 3316 | - if ( ! isset( $diff[ $time ] ) ) { |
|
| 3316 | + if ( ! isset( $diff[$time] ) ) { |
|
| 3317 | 3317 | continue; |
| 3318 | 3318 | } |
| 3319 | 3319 | |
| 3320 | - $total += $diff[ $time ] * self::convert_time( $time, $unit ); |
|
| 3320 | + $total += $diff[$time] * self::convert_time( $time, $unit ); |
|
| 3321 | 3321 | } |
| 3322 | 3322 | |
| 3323 | 3323 | return floor( $total ); |
@@ -3342,7 +3342,7 @@ discard block |
||
| 3342 | 3342 | 'y' => DAY_IN_SECONDS * 365.25, |
| 3343 | 3343 | ); |
| 3344 | 3344 | |
| 3345 | - return $convert[ $from ] / $convert[ $to ]; |
|
| 3345 | + return $convert[$from] / $convert[$to]; |
|
| 3346 | 3346 | } |
| 3347 | 3347 | |
| 3348 | 3348 | /** |
@@ -3355,7 +3355,7 @@ discard block |
||
| 3355 | 3355 | private static function get_unit( $unit ) { |
| 3356 | 3356 | $units = self::get_time_strings(); |
| 3357 | 3357 | |
| 3358 | - if ( isset( $units[ $unit ] ) || is_numeric( $unit ) ) { |
|
| 3358 | + if ( isset( $units[$unit] ) || is_numeric( $unit ) ) { |
|
| 3359 | 3359 | return $unit; |
| 3360 | 3360 | } |
| 3361 | 3361 | |
@@ -3481,17 +3481,17 @@ discard block |
||
| 3481 | 3481 | |
| 3482 | 3482 | case 1: |
| 3483 | 3483 | $l2 = $name; |
| 3484 | - self::add_value_to_array( $name, $l2, $this_val, $vars[ $l1 ] ); |
|
| 3484 | + self::add_value_to_array( $name, $l2, $this_val, $vars[$l1] ); |
|
| 3485 | 3485 | break; |
| 3486 | 3486 | |
| 3487 | 3487 | case 2: |
| 3488 | 3488 | $l3 = $name; |
| 3489 | - self::add_value_to_array( $name, $l3, $this_val, $vars[ $l1 ][ $l2 ] ); |
|
| 3489 | + self::add_value_to_array( $name, $l3, $this_val, $vars[$l1][$l2] ); |
|
| 3490 | 3490 | break; |
| 3491 | 3491 | |
| 3492 | 3492 | case 3: |
| 3493 | 3493 | $l4 = $name; |
| 3494 | - self::add_value_to_array( $name, $l4, $this_val, $vars[ $l1 ][ $l2 ][ $l3 ] ); |
|
| 3494 | + self::add_value_to_array( $name, $l4, $this_val, $vars[$l1][$l2][$l3] ); |
|
| 3495 | 3495 | } |
| 3496 | 3496 | |
| 3497 | 3497 | unset( $this_val, $n ); |
@@ -3515,8 +3515,8 @@ discard block |
||
| 3515 | 3515 | // phpcs:ignore Universal.Operators.StrictComparisons |
| 3516 | 3516 | if ( $name == '' ) { |
| 3517 | 3517 | $vars[] = $val; |
| 3518 | - } elseif ( ! isset( $vars[ $l1 ] ) ) { |
|
| 3519 | - $vars[ $l1 ] = $val; |
|
| 3518 | + } elseif ( ! isset( $vars[$l1] ) ) { |
|
| 3519 | + $vars[$l1] = $val; |
|
| 3520 | 3520 | } |
| 3521 | 3521 | } |
| 3522 | 3522 | |
@@ -3540,7 +3540,7 @@ discard block |
||
| 3540 | 3540 | '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' ), |
| 3541 | 3541 | ); |
| 3542 | 3542 | |
| 3543 | - if ( ! isset( $tooltips[ $name ] ) ) { |
|
| 3543 | + if ( ! isset( $tooltips[$name] ) ) { |
|
| 3544 | 3544 | return; |
| 3545 | 3545 | } |
| 3546 | 3546 | |
@@ -3550,7 +3550,7 @@ discard block |
||
| 3550 | 3550 | echo ' class="frm_help"'; |
| 3551 | 3551 | } |
| 3552 | 3552 | |
| 3553 | - echo ' title="' . esc_attr( $tooltips[ $name ] ); |
|
| 3553 | + echo ' title="' . esc_attr( $tooltips[$name] ); |
|
| 3554 | 3554 | |
| 3555 | 3555 | if ( 'open' !== $class ) { |
| 3556 | 3556 | echo '"'; |
@@ -3622,13 +3622,13 @@ discard block |
||
| 3622 | 3622 | * @return void |
| 3623 | 3623 | */ |
| 3624 | 3624 | private static function prepare_action_slashes( $val, $key, &$post_content ) { |
| 3625 | - if ( ! isset( $post_content[ $key ] ) || is_numeric( $val ) ) { |
|
| 3625 | + if ( ! isset( $post_content[$key] ) || is_numeric( $val ) ) { |
|
| 3626 | 3626 | return; |
| 3627 | 3627 | } |
| 3628 | 3628 | |
| 3629 | 3629 | if ( is_array( $val ) ) { |
| 3630 | 3630 | foreach ( $val as $k1 => $v1 ) { |
| 3631 | - self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] ); |
|
| 3631 | + self::prepare_action_slashes( $v1, $k1, $post_content[$key] ); |
|
| 3632 | 3632 | unset( $k1, $v1 ); |
| 3633 | 3633 | } |
| 3634 | 3634 | } else { |
@@ -3636,7 +3636,7 @@ discard block |
||
| 3636 | 3636 | $val = stripslashes( $val ); |
| 3637 | 3637 | |
| 3638 | 3638 | // Add backslashes before double quotes and forward slashes only |
| 3639 | - $post_content[ $key ] = addcslashes( $val, '"\\/' ); |
|
| 3639 | + $post_content[$key] = addcslashes( $val, '"\\/' ); |
|
| 3640 | 3640 | } |
| 3641 | 3641 | } |
| 3642 | 3642 | |
@@ -3765,14 +3765,14 @@ discard block |
||
| 3765 | 3765 | |
| 3766 | 3766 | $key = $input['name']; |
| 3767 | 3767 | |
| 3768 | - if ( isset( $formatted[ $key ] ) ) { |
|
| 3769 | - if ( is_array( $formatted[ $key ] ) ) { |
|
| 3770 | - $formatted[ $key ][] = $input['value']; |
|
| 3768 | + if ( isset( $formatted[$key] ) ) { |
|
| 3769 | + if ( is_array( $formatted[$key] ) ) { |
|
| 3770 | + $formatted[$key][] = $input['value']; |
|
| 3771 | 3771 | } else { |
| 3772 | - $formatted[ $key ] = array( $formatted[ $key ], $input['value'] ); |
|
| 3772 | + $formatted[$key] = array( $formatted[$key], $input['value'] ); |
|
| 3773 | 3773 | } |
| 3774 | 3774 | } else { |
| 3775 | - $formatted[ $key ] = $input['value']; |
|
| 3775 | + $formatted[$key] = $input['value']; |
|
| 3776 | 3776 | } |
| 3777 | 3777 | } |
| 3778 | 3778 | |
@@ -4503,8 +4503,8 @@ discard block |
||
| 4503 | 4503 | } |
| 4504 | 4504 | |
| 4505 | 4505 | foreach ( $keys as $key ) { |
| 4506 | - if ( isset( $values[ $key ] ) ) { |
|
| 4507 | - $values[ $key ] = self::kses( $values[ $key ], 'all' ); |
|
| 4506 | + if ( isset( $values[$key] ) ) { |
|
| 4507 | + $values[$key] = self::kses( $values[$key], 'all' ); |
|
| 4508 | 4508 | } |
| 4509 | 4509 | } |
| 4510 | 4510 | |
@@ -4571,7 +4571,7 @@ discard block |
||
| 4571 | 4571 | 'role', |
| 4572 | 4572 | 'style', |
| 4573 | 4573 | ); |
| 4574 | - $safe = in_array( $key, $safe_keys, true ); |
|
| 4574 | + $safe = in_array( $key, $safe_keys, true ); |
|
| 4575 | 4575 | }//end if |
| 4576 | 4576 | |
| 4577 | 4577 | /** |
@@ -4724,7 +4724,7 @@ discard block |
||
| 4724 | 4724 | return 0; |
| 4725 | 4725 | } |
| 4726 | 4726 | |
| 4727 | - return strlen( $parts[ count( $parts ) - 1 ] ); |
|
| 4727 | + return strlen( $parts[count( $parts ) - 1] ); |
|
| 4728 | 4728 | } |
| 4729 | 4729 | |
| 4730 | 4730 | /** |
@@ -4744,7 +4744,7 @@ discard block |
||
| 4744 | 4744 | |
| 4745 | 4745 | add_filter( |
| 4746 | 4746 | 'option_gmt_offset', |
| 4747 | - function ( $offset ) { |
|
| 4747 | + function( $offset ) { |
|
| 4748 | 4748 | if ( ! is_string( $offset ) || is_numeric( $offset ) ) { |
| 4749 | 4749 | // Leave a valid value alone. |
| 4750 | 4750 | return $offset; |
@@ -4841,7 +4841,7 @@ discard block |
||
| 4841 | 4841 | return; |
| 4842 | 4842 | } |
| 4843 | 4843 | |
| 4844 | - $ajax_callback = function () use ( $option ) { |
|
| 4844 | + $ajax_callback = function() use ( $option ) { |
|
| 4845 | 4845 | self::dismiss_warning_message( $option ); |
| 4846 | 4846 | }; |
| 4847 | 4847 | |
@@ -4851,7 +4851,7 @@ discard block |
||
| 4851 | 4851 | |
| 4852 | 4852 | add_filter( |
| 4853 | 4853 | 'frm_message_list', |
| 4854 | - function ( $show_messages ) use ( $message, $option ) { |
|
| 4854 | + function( $show_messages ) use ( $message, $option ) { |
|
| 4855 | 4855 | if ( get_option( $option, false ) ) { |
| 4856 | 4856 | return $show_messages; |
| 4857 | 4857 | } |