@@ -524,7 +524,8 @@ discard block |
||
524 | 524 | |
525 | 525 | if ( $src === 'get' ) { |
526 | 526 | $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 |
527 | - if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
527 | + if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { |
|
528 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
528 | 529 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
529 | 530 | $value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) ); |
530 | 531 | } |
@@ -612,7 +613,8 @@ discard block |
||
612 | 613 | $value = wp_unslash( $_GET[ $args['param'] ] ); |
613 | 614 | } |
614 | 615 | } elseif ( $args['type'] === 'post' ) { |
615 | - if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
616 | + if ( isset( $_POST[ $args['param'] ] ) ) { |
|
617 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
616 | 618 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
617 | 619 | $value = wp_unslash( $_POST[ $args['param'] ] ); |
618 | 620 | if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | 'fill' => '#4d4d4d', |
226 | 226 | 'orange' => '#f05a24', |
227 | 227 | ); |
228 | - $atts = array_merge( $defaults, $atts ); |
|
228 | + $atts = array_merge( $defaults, $atts ); |
|
229 | 229 | |
230 | 230 | 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'] ) . '"> |
231 | 231 | <path fill="' . esc_attr( $atts['orange'] ) . '" d="M289.6 384h140v76h-140z"/> |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | * @return string |
477 | 477 | */ |
478 | 478 | public static function get_server_value( $value ) { |
479 | - return isset( $_SERVER[ $value ] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[ $value ] ) ) : ''; |
|
479 | + return isset( $_SERVER[$value] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[$value] ) ) : ''; |
|
480 | 480 | } |
481 | 481 | |
482 | 482 | /** |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | $ip = ''; |
511 | 511 | |
512 | 512 | foreach ( $ip_options as $key ) { |
513 | - if ( ! isset( $_SERVER[ $key ] ) ) { |
|
513 | + if ( ! isset( $_SERVER[$key] ) ) { |
|
514 | 514 | continue; |
515 | 515 | } |
516 | 516 | |
@@ -579,10 +579,10 @@ discard block |
||
579 | 579 | } |
580 | 580 | |
581 | 581 | if ( $src === 'get' ) { |
582 | - $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 |
|
583 | - if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
582 | + $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 |
|
583 | + if ( ! isset( $_POST[$param] ) && isset( $_GET[$param] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
584 | 584 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
585 | - $value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) ); |
|
585 | + $value = htmlspecialchars_decode( wp_unslash( $_GET[$param] ) ); |
|
586 | 586 | } |
587 | 587 | self::sanitize_value( $sanitize, $value ); |
588 | 588 | } else { |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | } |
604 | 604 | |
605 | 605 | $p = trim( $p, ']' ); |
606 | - $value = isset( $value[ $p ] ) ? $value[ $p ] : $default; |
|
606 | + $value = isset( $value[$p] ) ? $value[$p] : $default; |
|
607 | 607 | } |
608 | 608 | } |
609 | 609 | |
@@ -668,26 +668,26 @@ discard block |
||
668 | 668 | 'sanitize' => 'sanitize_text_field', |
669 | 669 | 'serialized' => false, |
670 | 670 | ); |
671 | - $args = wp_parse_args( $args, $defaults ); |
|
671 | + $args = wp_parse_args( $args, $defaults ); |
|
672 | 672 | |
673 | 673 | $value = $args['default']; |
674 | 674 | if ( $args['type'] === 'get' ) { |
675 | - if ( $_GET && isset( $_GET[ $args['param'] ] ) ) { |
|
675 | + if ( $_GET && isset( $_GET[$args['param']] ) ) { |
|
676 | 676 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
677 | - $value = wp_unslash( $_GET[ $args['param'] ] ); |
|
677 | + $value = wp_unslash( $_GET[$args['param']] ); |
|
678 | 678 | } |
679 | 679 | } elseif ( $args['type'] === 'post' ) { |
680 | - if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
680 | + if ( isset( $_POST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
681 | 681 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
682 | - $value = wp_unslash( $_POST[ $args['param'] ] ); |
|
682 | + $value = wp_unslash( $_POST[$args['param']] ); |
|
683 | 683 | if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) { |
684 | 684 | self::unserialize_or_decode( $value ); |
685 | 685 | } |
686 | 686 | } |
687 | - } elseif ( isset( $_REQUEST[ $args['param'] ] ) ) { |
|
687 | + } elseif ( isset( $_REQUEST[$args['param']] ) ) { |
|
688 | 688 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
689 | 689 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
690 | - $value = wp_unslash( $_REQUEST[ $args['param'] ] ); |
|
690 | + $value = wp_unslash( $_REQUEST[$args['param']] ); |
|
691 | 691 | } |
692 | 692 | |
693 | 693 | self::sanitize_value( $args['sanitize'], $value ); |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | if ( is_array( $value ) ) { |
735 | 735 | $temp_values = $value; |
736 | 736 | foreach ( $temp_values as $k => $v ) { |
737 | - self::sanitize_value( $sanitize, $value[ $k ] ); |
|
737 | + self::sanitize_value( $sanitize, $value[$k] ); |
|
738 | 738 | } |
739 | 739 | return; |
740 | 740 | } |
@@ -745,8 +745,8 @@ discard block |
||
745 | 745 | public static function sanitize_request( $sanitize_method, &$values ) { |
746 | 746 | $temp_values = $values; |
747 | 747 | foreach ( $temp_values as $k => $val ) { |
748 | - if ( isset( $sanitize_method[ $k ] ) ) { |
|
749 | - $values[ $k ] = call_user_func( $sanitize_method[ $k ], $val ); |
|
748 | + if ( isset( $sanitize_method[$k] ) ) { |
|
749 | + $values[$k] = call_user_func( $sanitize_method[$k], $val ); |
|
750 | 750 | } |
751 | 751 | } |
752 | 752 | } |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | if ( is_array( $value ) ) { |
807 | 807 | $temp_values = $value; |
808 | 808 | foreach ( $temp_values as $k => $v ) { |
809 | - self::decode_specialchars( $value[ $k ] ); |
|
809 | + self::decode_specialchars( $value[$k] ); |
|
810 | 810 | } |
811 | 811 | } else { |
812 | 812 | self::decode_amp( $value ); |
@@ -941,7 +941,7 @@ discard block |
||
941 | 941 | * @return array |
942 | 942 | */ |
943 | 943 | public static function add_allowed_submit_button_tags( $allowed_html ) { |
944 | - $allowed_html['input'] = array( |
|
944 | + $allowed_html['input'] = array( |
|
945 | 945 | 'type' => true, |
946 | 946 | 'value' => true, |
947 | 947 | 'formnovalidate' => true, |
@@ -964,7 +964,7 @@ discard block |
||
964 | 964 | $allowed_html = $html; |
965 | 965 | } elseif ( ! empty( $allowed ) ) { |
966 | 966 | foreach ( (array) $allowed as $a ) { |
967 | - $allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array(); |
|
967 | + $allowed_html[$a] = isset( $html[$a] ) ? $html[$a] : array(); |
|
968 | 968 | } |
969 | 969 | } |
970 | 970 | |
@@ -1148,8 +1148,8 @@ discard block |
||
1148 | 1148 | } |
1149 | 1149 | |
1150 | 1150 | global $wp_query; |
1151 | - if ( isset( $wp_query->query_vars[ $param ] ) ) { |
|
1152 | - $value = $wp_query->query_vars[ $param ]; |
|
1151 | + if ( isset( $wp_query->query_vars[$param] ) ) { |
|
1152 | + $value = $wp_query->query_vars[$param]; |
|
1153 | 1153 | } |
1154 | 1154 | |
1155 | 1155 | return $value; |
@@ -1180,9 +1180,9 @@ discard block |
||
1180 | 1180 | 'frm_keyalt_icon' => 'frm_key_icon', |
1181 | 1181 | 'frm_keyalt_solid_icon' => 'frm_key_solid_icon', |
1182 | 1182 | ); |
1183 | - if ( isset( $deprecated[ $icon ] ) ) { |
|
1184 | - $icon = $deprecated[ $icon ]; |
|
1185 | - $class = str_replace( $icon, $deprecated[ $icon ], $class ); |
|
1183 | + if ( isset( $deprecated[$icon] ) ) { |
|
1184 | + $icon = $deprecated[$icon]; |
|
1185 | + $class = str_replace( $icon, $deprecated[$icon], $class ); |
|
1186 | 1186 | } |
1187 | 1187 | |
1188 | 1188 | if ( $icon === $class ) { |
@@ -1304,7 +1304,7 @@ discard block |
||
1304 | 1304 | * @return string|void |
1305 | 1305 | */ |
1306 | 1306 | public static function array_to_html_params( $atts, $echo = false ) { |
1307 | - $callback = function () use ( $atts ) { |
|
1307 | + $callback = function() use ( $atts ) { |
|
1308 | 1308 | if ( $atts ) { |
1309 | 1309 | foreach ( $atts as $key => $value ) { |
1310 | 1310 | echo ' ' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"'; |
@@ -1479,7 +1479,7 @@ discard block |
||
1479 | 1479 | 'input_id' => '', |
1480 | 1480 | 'value' => false, |
1481 | 1481 | ); |
1482 | - $atts = array_merge( $defaults, $atts ); |
|
1482 | + $atts = array_merge( $defaults, $atts ); |
|
1483 | 1483 | |
1484 | 1484 | if ( $atts['input_id'] === 'template' && empty( $atts['tosearch'] ) ) { |
1485 | 1485 | $atts['tosearch'] = 'frm-card'; |
@@ -1555,7 +1555,7 @@ discard block |
||
1555 | 1555 | 'new_file_path' => self::plugin_path() . '/js', |
1556 | 1556 | ) |
1557 | 1557 | ); |
1558 | - $new_file = new FrmCreateFile( $file_atts ); |
|
1558 | + $new_file = new FrmCreateFile( $file_atts ); |
|
1559 | 1559 | |
1560 | 1560 | $files = array( |
1561 | 1561 | self::plugin_path() . '/js/formidable.min.js', |
@@ -2059,8 +2059,8 @@ discard block |
||
2059 | 2059 | return $error; |
2060 | 2060 | } |
2061 | 2061 | |
2062 | - $nonce_value = $_REQUEST && isset( $_REQUEST[ $nonce_name ] ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $nonce_name ] ) ) : ''; |
|
2063 | - if ( $_REQUEST && ( ! isset( $_REQUEST[ $nonce_name ] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
2062 | + $nonce_value = $_REQUEST && isset( $_REQUEST[$nonce_name] ) ? sanitize_text_field( wp_unslash( $_REQUEST[$nonce_name] ) ) : ''; |
|
2063 | + if ( $_REQUEST && ( ! isset( $_REQUEST[$nonce_name] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
2064 | 2064 | $frm_settings = self::get_settings(); |
2065 | 2065 | $error = $frm_settings->admin_permission; |
2066 | 2066 | } |
@@ -2096,7 +2096,7 @@ discard block |
||
2096 | 2096 | } else { |
2097 | 2097 | foreach ( $value as $k => $v ) { |
2098 | 2098 | if ( ! is_array( $v ) ) { |
2099 | - $value[ $k ] = call_user_func( $original_function, $v ); |
|
2099 | + $value[$k] = call_user_func( $original_function, $v ); |
|
2100 | 2100 | } |
2101 | 2101 | } |
2102 | 2102 | } |
@@ -2137,7 +2137,7 @@ discard block |
||
2137 | 2137 | if ( is_array( $value ) ) { |
2138 | 2138 | $return = array_merge( $return, self::array_flatten( $value, $keys ) ); |
2139 | 2139 | } elseif ( $keys === 'keep' ) { |
2140 | - $return[ $key ] = $value; |
|
2140 | + $return[$key] = $value; |
|
2141 | 2141 | } else { |
2142 | 2142 | $return[] = $value; |
2143 | 2143 | } |
@@ -2212,11 +2212,11 @@ discard block |
||
2212 | 2212 | } |
2213 | 2213 | |
2214 | 2214 | $ver = $default; |
2215 | - if ( ! isset( $wp_scripts->registered[ $handle ] ) ) { |
|
2215 | + if ( ! isset( $wp_scripts->registered[$handle] ) ) { |
|
2216 | 2216 | return $ver; |
2217 | 2217 | } |
2218 | 2218 | |
2219 | - $query = $wp_scripts->registered[ $handle ]; |
|
2219 | + $query = $wp_scripts->registered[$handle]; |
|
2220 | 2220 | if ( is_object( $query ) && ! empty( $query->ver ) ) { |
2221 | 2221 | $ver = $query->ver; |
2222 | 2222 | } |
@@ -2232,7 +2232,7 @@ discard block |
||
2232 | 2232 | * @return string|null |
2233 | 2233 | */ |
2234 | 2234 | public static function js_redirect( $url, $echo = false ) { |
2235 | - $callback = function () use ( $url ) { |
|
2235 | + $callback = function() use ( $url ) { |
|
2236 | 2236 | echo '<script type="text/javascript">window.location="' . esc_url_raw( $url ) . '"</script>'; |
2237 | 2237 | }; |
2238 | 2238 | return self::clip( $callback, $echo ); |
@@ -2327,7 +2327,7 @@ discard block |
||
2327 | 2327 | $suffix = 2; |
2328 | 2328 | do { |
2329 | 2329 | $key_check = $key . $separator . $suffix; |
2330 | - ++$suffix; |
|
2330 | + ++ $suffix; |
|
2331 | 2331 | } while ( in_array( $key_check, $similar_keys, true ) ); |
2332 | 2332 | |
2333 | 2333 | $key = $key_check; |
@@ -2435,7 +2435,7 @@ discard block |
||
2435 | 2435 | |
2436 | 2436 | foreach ( array( 'name', 'description' ) as $var ) { |
2437 | 2437 | $default_val = isset( $record->{$var} ) ? $record->{$var} : ''; |
2438 | - $values[ $var ] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
2438 | + $values[$var] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
2439 | 2439 | unset( $var, $default_val ); |
2440 | 2440 | } |
2441 | 2441 | |
@@ -2491,9 +2491,9 @@ discard block |
||
2491 | 2491 | $meta_value = FrmEntryMeta::get_meta_value( $record, $field->id ); |
2492 | 2492 | }//end if |
2493 | 2493 | |
2494 | - $field_type = isset( $post_values['field_options'][ 'type_' . $field->id ] ) ? $post_values['field_options'][ 'type_' . $field->id ] : $field->type; |
|
2495 | - if ( isset( $post_values['item_meta'][ $field->id ] ) ) { |
|
2496 | - $new_value = $post_values['item_meta'][ $field->id ]; |
|
2494 | + $field_type = isset( $post_values['field_options']['type_' . $field->id] ) ? $post_values['field_options']['type_' . $field->id] : $field->type; |
|
2495 | + if ( isset( $post_values['item_meta'][$field->id] ) ) { |
|
2496 | + $new_value = $post_values['item_meta'][$field->id]; |
|
2497 | 2497 | self::unserialize_or_decode( $new_value ); |
2498 | 2498 | } else { |
2499 | 2499 | $new_value = $meta_value; |
@@ -2514,7 +2514,7 @@ discard block |
||
2514 | 2514 | |
2515 | 2515 | $field_array = array_merge( (array) $field->field_options, $field_array ); |
2516 | 2516 | |
2517 | - $values['fields'][ $field->id ] = $field_array; |
|
2517 | + $values['fields'][$field->id] = $field_array; |
|
2518 | 2518 | } |
2519 | 2519 | |
2520 | 2520 | /** |
@@ -2564,11 +2564,11 @@ discard block |
||
2564 | 2564 | } |
2565 | 2565 | |
2566 | 2566 | foreach ( $form->options as $opt => $value ) { |
2567 | - if ( isset( $post_values[ $opt ] ) ) { |
|
2568 | - $values[ $opt ] = $post_values[ $opt ]; |
|
2569 | - self::unserialize_or_decode( $values[ $opt ] ); |
|
2567 | + if ( isset( $post_values[$opt] ) ) { |
|
2568 | + $values[$opt] = $post_values[$opt]; |
|
2569 | + self::unserialize_or_decode( $values[$opt] ); |
|
2570 | 2570 | } else { |
2571 | - $values[ $opt ] = $value; |
|
2571 | + $values[$opt] = $value; |
|
2572 | 2572 | } |
2573 | 2573 | } |
2574 | 2574 | |
@@ -2582,8 +2582,8 @@ discard block |
||
2582 | 2582 | $form_defaults = FrmFormsHelper::get_default_opts(); |
2583 | 2583 | |
2584 | 2584 | foreach ( $form_defaults as $opt => $default ) { |
2585 | - if ( ! isset( $values[ $opt ] ) || $values[ $opt ] == '' ) { |
|
2586 | - $values[ $opt ] = $post_values && isset( $post_values['options'][ $opt ] ) ? $post_values['options'][ $opt ] : $default; |
|
2585 | + if ( ! isset( $values[$opt] ) || $values[$opt] == '' ) { |
|
2586 | + $values[$opt] = $post_values && isset( $post_values['options'][$opt] ) ? $post_values['options'][$opt] : $default; |
|
2587 | 2587 | } |
2588 | 2588 | |
2589 | 2589 | unset( $opt, $default ); |
@@ -2594,8 +2594,8 @@ discard block |
||
2594 | 2594 | } |
2595 | 2595 | |
2596 | 2596 | foreach ( array( 'before', 'after', 'submit' ) as $h ) { |
2597 | - if ( ! isset( $values[ $h . '_html' ] ) ) { |
|
2598 | - $values[ $h . '_html' ] = ( isset( $post_values['options'][ $h . '_html' ] ) ? $post_values['options'][ $h . '_html' ] : FrmFormsHelper::get_default_html( $h ) ); |
|
2597 | + if ( ! isset( $values[$h . '_html'] ) ) { |
|
2598 | + $values[$h . '_html'] = ( isset( $post_values['options'][$h . '_html'] ) ? $post_values['options'][$h . '_html'] : FrmFormsHelper::get_default_html( $h ) ); |
|
2599 | 2599 | } |
2600 | 2600 | unset( $h ); |
2601 | 2601 | } |
@@ -2790,25 +2790,25 @@ discard block |
||
2790 | 2790 | if ( ! is_numeric( $levels ) ) { |
2791 | 2791 | // Show time in specified unit. |
2792 | 2792 | $levels = self::get_unit( $levels ); |
2793 | - if ( isset( $time_strings[ $levels ] ) ) { |
|
2793 | + if ( isset( $time_strings[$levels] ) ) { |
|
2794 | 2794 | $diff = array( |
2795 | 2795 | $levels => self::time_format( $levels, $diff ), |
2796 | 2796 | ); |
2797 | 2797 | $time_strings = array( |
2798 | - $levels => $time_strings[ $levels ], |
|
2798 | + $levels => $time_strings[$levels], |
|
2799 | 2799 | ); |
2800 | 2800 | } |
2801 | 2801 | $levels = 1; |
2802 | 2802 | } |
2803 | 2803 | |
2804 | 2804 | foreach ( $time_strings as $k => $v ) { |
2805 | - if ( isset( $diff[ $k ] ) && $diff[ $k ] ) { |
|
2806 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . ( $diff[ $k ] > 1 ? $v[1] : $v[0] ); |
|
2807 | - } elseif ( isset( $diff[ $k ] ) && count( $time_strings ) === 1 ) { |
|
2805 | + if ( isset( $diff[$k] ) && $diff[$k] ) { |
|
2806 | + $time_strings[$k] = $diff[$k] . ' ' . ( $diff[$k] > 1 ? $v[1] : $v[0] ); |
|
2807 | + } elseif ( isset( $diff[$k] ) && count( $time_strings ) === 1 ) { |
|
2808 | 2808 | // Account for 0. |
2809 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . $v[1]; |
|
2809 | + $time_strings[$k] = $diff[$k] . ' ' . $v[1]; |
|
2810 | 2810 | } else { |
2811 | - unset( $time_strings[ $k ] ); |
|
2811 | + unset( $time_strings[$k] ); |
|
2812 | 2812 | } |
2813 | 2813 | } |
2814 | 2814 | |
@@ -2827,8 +2827,8 @@ discard block |
||
2827 | 2827 | 'y' => 'y', |
2828 | 2828 | 'd' => 'days', |
2829 | 2829 | ); |
2830 | - if ( isset( $return[ $unit ] ) ) { |
|
2831 | - return $diff[ $return[ $unit ] ]; |
|
2830 | + if ( isset( $return[$unit] ) ) { |
|
2831 | + return $diff[$return[$unit]]; |
|
2832 | 2832 | } |
2833 | 2833 | |
2834 | 2834 | $total = $diff['days'] * self::convert_time( 'd', $unit ); |
@@ -2836,11 +2836,11 @@ discard block |
||
2836 | 2836 | $times = array( 'h', 'i', 's' ); |
2837 | 2837 | |
2838 | 2838 | foreach ( $times as $time ) { |
2839 | - if ( ! isset( $diff[ $time ] ) ) { |
|
2839 | + if ( ! isset( $diff[$time] ) ) { |
|
2840 | 2840 | continue; |
2841 | 2841 | } |
2842 | 2842 | |
2843 | - $total += $diff[ $time ] * self::convert_time( $time, $unit ); |
|
2843 | + $total += $diff[$time] * self::convert_time( $time, $unit ); |
|
2844 | 2844 | } |
2845 | 2845 | |
2846 | 2846 | return floor( $total ); |
@@ -2860,7 +2860,7 @@ discard block |
||
2860 | 2860 | 'y' => DAY_IN_SECONDS * 365.25, |
2861 | 2861 | ); |
2862 | 2862 | |
2863 | - return $convert[ $from ] / $convert[ $to ]; |
|
2863 | + return $convert[$from] / $convert[$to]; |
|
2864 | 2864 | } |
2865 | 2865 | |
2866 | 2866 | /** |
@@ -2868,7 +2868,7 @@ discard block |
||
2868 | 2868 | */ |
2869 | 2869 | private static function get_unit( $unit ) { |
2870 | 2870 | $units = self::get_time_strings(); |
2871 | - if ( isset( $units[ $unit ] ) || is_numeric( $unit ) ) { |
|
2871 | + if ( isset( $units[$unit] ) || is_numeric( $unit ) ) { |
|
2872 | 2872 | return $unit; |
2873 | 2873 | } |
2874 | 2874 | |
@@ -2984,17 +2984,17 @@ discard block |
||
2984 | 2984 | |
2985 | 2985 | case 1: |
2986 | 2986 | $l2 = $name; |
2987 | - self::add_value_to_array( $name, $l2, $this_val, $vars[ $l1 ] ); |
|
2987 | + self::add_value_to_array( $name, $l2, $this_val, $vars[$l1] ); |
|
2988 | 2988 | break; |
2989 | 2989 | |
2990 | 2990 | case 2: |
2991 | 2991 | $l3 = $name; |
2992 | - self::add_value_to_array( $name, $l3, $this_val, $vars[ $l1 ][ $l2 ] ); |
|
2992 | + self::add_value_to_array( $name, $l3, $this_val, $vars[$l1][$l2] ); |
|
2993 | 2993 | break; |
2994 | 2994 | |
2995 | 2995 | case 3: |
2996 | 2996 | $l4 = $name; |
2997 | - self::add_value_to_array( $name, $l4, $this_val, $vars[ $l1 ][ $l2 ][ $l3 ] ); |
|
2997 | + self::add_value_to_array( $name, $l4, $this_val, $vars[$l1][$l2][$l3] ); |
|
2998 | 2998 | } |
2999 | 2999 | |
3000 | 3000 | unset( $this_val, $n ); |
@@ -3013,8 +3013,8 @@ discard block |
||
3013 | 3013 | public static function add_value_to_array( $name, $l1, $val, &$vars ) { |
3014 | 3014 | if ( $name == '' ) { |
3015 | 3015 | $vars[] = $val; |
3016 | - } elseif ( ! isset( $vars[ $l1 ] ) ) { |
|
3017 | - $vars[ $l1 ] = $val; |
|
3016 | + } elseif ( ! isset( $vars[$l1] ) ) { |
|
3017 | + $vars[$l1] = $val; |
|
3018 | 3018 | } |
3019 | 3019 | } |
3020 | 3020 | |
@@ -3031,7 +3031,7 @@ discard block |
||
3031 | 3031 | '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' ), |
3032 | 3032 | ); |
3033 | 3033 | |
3034 | - if ( ! isset( $tooltips[ $name ] ) ) { |
|
3034 | + if ( ! isset( $tooltips[$name] ) ) { |
|
3035 | 3035 | return; |
3036 | 3036 | } |
3037 | 3037 | |
@@ -3041,7 +3041,7 @@ discard block |
||
3041 | 3041 | echo ' class="frm_help"'; |
3042 | 3042 | } |
3043 | 3043 | |
3044 | - echo ' title="' . esc_attr( $tooltips[ $name ] ); |
|
3044 | + echo ' title="' . esc_attr( $tooltips[$name] ); |
|
3045 | 3045 | |
3046 | 3046 | if ( 'open' != $class ) { |
3047 | 3047 | echo '"'; |
@@ -3100,13 +3100,13 @@ discard block |
||
3100 | 3100 | } |
3101 | 3101 | |
3102 | 3102 | private static function prepare_action_slashes( $val, $key, &$post_content ) { |
3103 | - if ( ! isset( $post_content[ $key ] ) || is_numeric( $val ) ) { |
|
3103 | + if ( ! isset( $post_content[$key] ) || is_numeric( $val ) ) { |
|
3104 | 3104 | return; |
3105 | 3105 | } |
3106 | 3106 | |
3107 | 3107 | if ( is_array( $val ) ) { |
3108 | 3108 | foreach ( $val as $k1 => $v1 ) { |
3109 | - self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] ); |
|
3109 | + self::prepare_action_slashes( $v1, $k1, $post_content[$key] ); |
|
3110 | 3110 | unset( $k1, $v1 ); |
3111 | 3111 | } |
3112 | 3112 | } else { |
@@ -3114,7 +3114,7 @@ discard block |
||
3114 | 3114 | $val = stripslashes( $val ); |
3115 | 3115 | |
3116 | 3116 | // Add backslashes before double quotes and forward slashes only |
3117 | - $post_content[ $key ] = addcslashes( $val, '"\\/' ); |
|
3117 | + $post_content[$key] = addcslashes( $val, '"\\/' ); |
|
3118 | 3118 | } |
3119 | 3119 | } |
3120 | 3120 | |
@@ -3235,14 +3235,14 @@ discard block |
||
3235 | 3235 | continue; |
3236 | 3236 | } |
3237 | 3237 | $key = $input['name']; |
3238 | - if ( isset( $formatted[ $key ] ) ) { |
|
3239 | - if ( is_array( $formatted[ $key ] ) ) { |
|
3240 | - $formatted[ $key ][] = $input['value']; |
|
3238 | + if ( isset( $formatted[$key] ) ) { |
|
3239 | + if ( is_array( $formatted[$key] ) ) { |
|
3240 | + $formatted[$key][] = $input['value']; |
|
3241 | 3241 | } else { |
3242 | - $formatted[ $key ] = array( $formatted[ $key ], $input['value'] ); |
|
3242 | + $formatted[$key] = array( $formatted[$key], $input['value'] ); |
|
3243 | 3243 | } |
3244 | 3244 | } else { |
3245 | - $formatted[ $key ] = $input['value']; |
|
3245 | + $formatted[$key] = $input['value']; |
|
3246 | 3246 | } |
3247 | 3247 | } |
3248 | 3248 | |
@@ -3329,7 +3329,7 @@ discard block |
||
3329 | 3329 | * @return void |
3330 | 3330 | */ |
3331 | 3331 | public static function localize_script( $location ) { |
3332 | - if ( ! empty( self::$localized_script_locations[ $location ] ) ) { |
|
3332 | + if ( ! empty( self::$localized_script_locations[$location] ) ) { |
|
3333 | 3333 | return; |
3334 | 3334 | } |
3335 | 3335 | |
@@ -3437,7 +3437,7 @@ discard block |
||
3437 | 3437 | } |
3438 | 3438 | }//end if |
3439 | 3439 | |
3440 | - self::$localized_script_locations[ $location ] = true; |
|
3440 | + self::$localized_script_locations[$location] = true; |
|
3441 | 3441 | } |
3442 | 3442 | |
3443 | 3443 | /** |
@@ -3956,8 +3956,8 @@ discard block |
||
3956 | 3956 | } |
3957 | 3957 | |
3958 | 3958 | foreach ( $keys as $key ) { |
3959 | - if ( isset( $values[ $key ] ) ) { |
|
3960 | - $values[ $key ] = self::kses( $values[ $key ], 'all' ); |
|
3959 | + if ( isset( $values[$key] ) ) { |
|
3960 | + $values[$key] = self::kses( $values[$key], 'all' ); |
|
3961 | 3961 | } |
3962 | 3962 | } |
3963 | 3963 | |
@@ -4022,7 +4022,7 @@ discard block |
||
4022 | 4022 | 'role', |
4023 | 4023 | 'style', |
4024 | 4024 | ); |
4025 | - $safe = in_array( $key, $safe_keys, true ); |
|
4025 | + $safe = in_array( $key, $safe_keys, true ); |
|
4026 | 4026 | }//end if |
4027 | 4027 | |
4028 | 4028 | /** |
@@ -4161,7 +4161,7 @@ discard block |
||
4161 | 4161 | return 0; |
4162 | 4162 | } |
4163 | 4163 | |
4164 | - return strlen( $parts[ count( $parts ) - 1 ] ); |
|
4164 | + return strlen( $parts[count( $parts ) - 1] ); |
|
4165 | 4165 | } |
4166 | 4166 | |
4167 | 4167 | /** |
@@ -4181,7 +4181,7 @@ discard block |
||
4181 | 4181 | |
4182 | 4182 | add_filter( |
4183 | 4183 | 'option_gmt_offset', |
4184 | - function ( $offset ) { |
|
4184 | + function( $offset ) { |
|
4185 | 4185 | if ( ! is_string( $offset ) || is_numeric( $offset ) ) { |
4186 | 4186 | // Leave a valid value alone. |
4187 | 4187 | return $offset; |
@@ -4278,7 +4278,7 @@ discard block |
||
4278 | 4278 | return; |
4279 | 4279 | } |
4280 | 4280 | |
4281 | - $ajax_callback = function () use ( $option ) { |
|
4281 | + $ajax_callback = function() use ( $option ) { |
|
4282 | 4282 | self::dismiss_warning_message( $option ); |
4283 | 4283 | }; |
4284 | 4284 | |
@@ -4288,7 +4288,7 @@ discard block |
||
4288 | 4288 | |
4289 | 4289 | add_filter( |
4290 | 4290 | 'frm_message_list', |
4291 | - function ( $show_messages ) use ( $message, $option ) { |
|
4291 | + function( $show_messages ) use ( $message, $option ) { |
|
4292 | 4292 | if ( get_option( $option, false ) ) { |
4293 | 4293 | return $show_messages; |
4294 | 4294 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | // This filter flags the Pro credit card field that Stripe is enabled. |
28 | 28 | add_filter( |
29 | 29 | 'frm_pro_show_card_callback', |
30 | - function () { |
|
30 | + function() { |
|
31 | 31 | return 'FrmStrpLiteActionsController::show_card'; |
32 | 32 | } |
33 | 33 | ); |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | // This filter hides gateway fields from the entries list. |
36 | 36 | add_filter( |
37 | 37 | 'frm_fields_in_entries_list_table', |
38 | - function ( $form_cols ) { |
|
38 | + function( $form_cols ) { |
|
39 | 39 | return array_filter( |
40 | 40 | $form_cols, |
41 | - function ( $form_col ) { |
|
41 | + function( $form_col ) { |
|
42 | 42 | return 'gateway' !== $form_col->type; |
43 | 43 | } |
44 | 44 | ); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * @param object $frm_settings |
25 | 25 | * @return void |
26 | 26 | */ |
27 | - function ( $frm_settings ) { |
|
27 | + function( $frm_settings ) { |
|
28 | 28 | $stripe_settings = FrmStrpLiteAppHelper::get_settings()->settings; |
29 | 29 | require FrmStrpLiteAppHelper::plugin_path() . '/views/settings/messages.php'; |
30 | 30 | } |
@@ -148,13 +148,13 @@ discard block |
||
148 | 148 | |
149 | 149 | $is_setup_intent = 0 === strpos( $intent->id, 'seti_' ); |
150 | 150 | if ( $is_setup_intent ) { |
151 | - $errors[ 'field' . $cc_field_id ] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : ''; |
|
151 | + $errors['field' . $cc_field_id] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : ''; |
|
152 | 152 | } else { |
153 | - $errors[ 'field' . $cc_field_id ] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : ''; |
|
153 | + $errors['field' . $cc_field_id] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : ''; |
|
154 | 154 | } |
155 | 155 | |
156 | - if ( ! $errors[ 'field' . $cc_field_id ] ) { |
|
157 | - $errors[ 'field' . $cc_field_id ] = 'Payment was not successfully processed.'; |
|
156 | + if ( ! $errors['field' . $cc_field_id] ) { |
|
157 | + $errors['field' . $cc_field_id] = 'Payment was not successfully processed.'; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | global $frm_vars; |
@@ -182,10 +182,10 @@ discard block |
||
182 | 182 | $save_draft = ! empty( $form->options['save_draft'] ); |
183 | 183 | |
184 | 184 | global $frm_vars; |
185 | - $frm_vars['created_entries'][ $form_id ]['errors'] = $errors; |
|
185 | + $frm_vars['created_entries'][$form_id]['errors'] = $errors; |
|
186 | 186 | |
187 | 187 | // Set to true to get FrmProFieldsHelper::get_page_with_error() run. |
188 | - $_POST[ 'frm_page_order_' . $form_id ] = true; |
|
188 | + $_POST['frm_page_order_' . $form_id] = true; |
|
189 | 189 | |
190 | 190 | if ( ! $save_draft ) { |
191 | 191 | // If draft saving is not on, delete the entry. |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | } |
195 | 195 | |
196 | 196 | // If draft saving is on, load the draft entry. |
197 | - $frm_vars['created_entries'][ $form_id ]['entry_id'] = $entry_id; |
|
197 | + $frm_vars['created_entries'][$form_id]['entry_id'] = $entry_id; |
|
198 | 198 | add_action( |
199 | 199 | 'frm_filter_final_form', |
200 | 200 | /** |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | * @param int $entry_id |
205 | 205 | * @return string |
206 | 206 | */ |
207 | - function ( $html ) use ( $entry_id ) { |
|
207 | + function( $html ) use ( $entry_id ) { |
|
208 | 208 | global $wpdb; |
209 | 209 | $wpdb->update( $wpdb->prefix . 'frm_items', array( 'is_draft' => 1 ), array( 'id' => $entry_id ) ); |
210 | 210 | return $html; |
@@ -393,8 +393,8 @@ discard block |
||
393 | 393 | return $values; |
394 | 394 | } |
395 | 395 | |
396 | - if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[ $field->id ] ) ) { |
|
397 | - $values['value'] = $previous_entry->metas[ $field->id ]; |
|
396 | + if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[$field->id] ) ) { |
|
397 | + $values['value'] = $previous_entry->metas[$field->id]; |
|
398 | 398 | } |
399 | 399 | |
400 | 400 | $frm_vars['trans_filled'] = true; |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | * @param Closure $destroy_callback |
430 | 430 | * @return void |
431 | 431 | */ |
432 | - function () use ( $entry_id, &$destroy_callback ) { |
|
432 | + function() use ( $entry_id, &$destroy_callback ) { |
|
433 | 433 | FrmEntry::destroy( $entry_id ); |
434 | 434 | // Only call this once. |
435 | 435 | remove_action( 'frm_entry_form', $destroy_callback ); |
@@ -148,7 +148,7 @@ |
||
148 | 148 | |
149 | 149 | register_deactivation_hook( |
150 | 150 | __FILE__, |
151 | - function () { |
|
151 | + function() { |
|
152 | 152 | if ( ! class_exists( 'FrmCronController', false ) ) { |
153 | 153 | require_once __DIR__ . '/classes/controllers/FrmCronController.php'; |
154 | 154 | } |
@@ -149,7 +149,7 @@ |
||
149 | 149 | 'form' => $entry->form_id, |
150 | 150 | 'value' => $action->post_content['description'], |
151 | 151 | ); |
152 | - $new_values = array( 'description' => FrmTransLiteAppHelper::process_shortcodes( $shortcode_atts ) ); |
|
152 | + $new_values = array( 'description' => FrmTransLiteAppHelper::process_shortcodes( $shortcode_atts ) ); |
|
153 | 153 | FrmStrpLiteAppHelper::call_stripe_helper_class( 'update_intent', $intent->id, $new_values ); |
154 | 154 | } |
155 | 155 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $intent_is_processing = 'processing' === $intent->status; |
58 | 58 | if ( $intent_is_processing ) { |
59 | 59 | // Append an additional processing message to the end of the success message. |
60 | - $filter = function ( $message ) { |
|
60 | + $filter = function( $message ) { |
|
61 | 61 | $stripe_settings = FrmStrpLiteAppHelper::get_settings(); |
62 | 62 | $message .= '<p>' . esc_html( $stripe_settings->settings->processing_message ) . '</p>'; |
63 | 63 | return $message; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $atts['form'] = FrmForm::getOne( $atts['entry']->form_id ); |
162 | 162 | $atts['entry_id'] = $atts['entry']->id; |
163 | 163 | $opt = 'success_action'; |
164 | - $atts['conf_method'] = ! empty( $atts['form']->options[ $opt ] ) ? $atts['form']->options[ $opt ] : 'message'; |
|
164 | + $atts['conf_method'] = ! empty( $atts['form']->options[$opt] ) ? $atts['form']->options[$opt] : 'message'; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
@@ -238,10 +238,10 @@ discard block |
||
238 | 238 | */ |
239 | 239 | public static function get_payment_intents( $name ) { |
240 | 240 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
241 | - if ( ! isset( $_POST[ $name ] ) ) { |
|
241 | + if ( ! isset( $_POST[$name] ) ) { |
|
242 | 242 | return array(); |
243 | 243 | } |
244 | - $intents = $_POST[ $name ]; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
244 | + $intents = $_POST[$name]; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
245 | 245 | FrmAppHelper::sanitize_value( 'sanitize_text_field', $intents ); |
246 | 246 | return $intents; |
247 | 247 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | self::format_form_data( $form ); |
269 | 269 | |
270 | 270 | $form_id = absint( $form['form_id'] ); |
271 | - $intents = isset( $form[ 'frmintent' . $form_id ] ) ? $form[ 'frmintent' . $form_id ] : array(); |
|
271 | + $intents = isset( $form['frmintent' . $form_id] ) ? $form['frmintent' . $form_id] : array(); |
|
272 | 272 | |
273 | 273 | if ( empty( $intents ) ) { |
274 | 274 | wp_die(); |
@@ -278,8 +278,8 @@ discard block |
||
278 | 278 | $intents = array( $intents ); |
279 | 279 | } else { |
280 | 280 | foreach ( $intents as $k => $intent ) { |
281 | - if ( is_array( $intent ) && isset( $intent[ $k ] ) ) { |
|
282 | - $intents[ $k ] = $intent[ $k ]; |
|
281 | + if ( is_array( $intent ) && isset( $intent[$k] ) ) { |
|
282 | + $intents[$k] = $intent[$k]; |
|
283 | 283 | } |
284 | 284 | } |
285 | 285 | } |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | if ( $saved->metadata->action != $action->ID ) { |
333 | 333 | continue; |
334 | 334 | } |
335 | - $intents[ $k ] = array( |
|
335 | + $intents[$k] = array( |
|
336 | 336 | 'id' => $intent, |
337 | 337 | 'action' => $action->ID, |
338 | 338 | ); |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | if ( $k === 'item_meta' ) { |
376 | 376 | foreach ( $v as $f => $value ) { |
377 | 377 | FrmAppHelper::sanitize_value( 'wp_kses_post', $value ); |
378 | - $entry->metas[ absint( $f ) ] = $value; |
|
378 | + $entry->metas[absint( $f )] = $value; |
|
379 | 379 | } |
380 | 380 | } else { |
381 | 381 | FrmAppHelper::sanitize_value( 'wp_kses_post', $v ); |
@@ -399,14 +399,14 @@ discard block |
||
399 | 399 | |
400 | 400 | foreach ( $form as $input ) { |
401 | 401 | $key = $input['name']; |
402 | - if ( isset( $formatted[ $key ] ) ) { |
|
403 | - if ( is_array( $formatted[ $key ] ) ) { |
|
404 | - $formatted[ $key ][] = $input['value']; |
|
402 | + if ( isset( $formatted[$key] ) ) { |
|
403 | + if ( is_array( $formatted[$key] ) ) { |
|
404 | + $formatted[$key][] = $input['value']; |
|
405 | 405 | } else { |
406 | - $formatted[ $key ] = array( $formatted[ $key ], $input['value'] ); |
|
406 | + $formatted[$key] = array( $formatted[$key], $input['value'] ); |
|
407 | 407 | } |
408 | 408 | } else { |
409 | - $formatted[ $key ] = $input['value']; |
|
409 | + $formatted[$key] = $input['value']; |
|
410 | 410 | } |
411 | 411 | } |
412 | 412 | |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | |
550 | 550 | foreach ( $actions as $k => $action ) { |
551 | 551 | $amount = self::get_amount_before_submit( compact( 'action', 'form' ) ); |
552 | - $actions[ $k ]->post_content['amount'] = $amount; |
|
552 | + $actions[$k]->post_content['amount'] = $amount; |
|
553 | 553 | } |
554 | 554 | } |
555 | 555 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $info['url'] = $xml; |
12 | 12 | } |
13 | 13 | |
14 | - $disabled = isset( $imported[ $info['form'] ] ) ? ' disabled' : ''; |
|
14 | + $disabled = isset( $imported[$info['form']] ) ? ' disabled' : ''; |
|
15 | 15 | $url = isset( $info['url'] ) ? $info['url'] : ''; |
16 | 16 | $value = $importing === 'form' ? $info['form'] : $info['key']; |
17 | 17 | if ( ! isset( $info['img'] ) ) { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | continue; |
22 | 22 | } |
23 | 23 | |
24 | - $hide_views = $importing === 'view' && ( ( $selected && $info['form'] !== $selected ) || isset( $imported[ $info['form'] ] ) ); |
|
24 | + $hide_views = $importing === 'view' && ( ( $selected && $info['form'] !== $selected ) || isset( $imported[$info['form']] ) ); |
|
25 | 25 | ?> |
26 | 26 | <div class="frm_radio radio-inline radio frm_image_option<?php echo esc_attr( $importing === 'view' ? ' show_sub_opt show_' . $info['form'] : '' ); ?>" style="<?php echo esc_attr( $hide_views ? 'display:none' : '' ); ?>"> |
27 | 27 | <?php if ( $importing === 'form' ) { ?> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | <?php } ?> |
42 | 42 | /> |
43 | 43 | <div class="frm_image_option_container frm_label_with_image"> |
44 | - <?php echo FrmAppHelper::kses( $info['img'], array( 'svg', 'rect', 'path' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
|
44 | + <?php echo FrmAppHelper::kses( $info['img'], array( 'svg', 'rect', 'path' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
|
45 | 45 | <span class="frm_text_label_for_image"> |
46 | 46 | <?php |
47 | 47 | if ( ! empty( $disabled ) ) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | if ( $importing === 'form' && $disabled ) { |
57 | - echo FrmAppHelper::kses( FrmFormsHelper::edit_form_link( $imported[ $info['form'] ] ), array( 'a' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
57 | + echo FrmAppHelper::kses( FrmFormsHelper::edit_form_link( $imported[$info['form']] ), array( 'a' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
58 | 58 | } else { |
59 | 59 | echo esc_html( $info['name'] ); |
60 | 60 | } |