@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | 'fill' => '#4d4d4d', |
163 | 163 | 'orange' => '#f05a24', |
164 | 164 | ); |
165 | - $atts = array_merge( $defaults, $atts ); |
|
165 | + $atts = array_merge( $defaults, $atts ); |
|
166 | 166 | |
167 | 167 | 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'] ) . '"> |
168 | 168 | <path fill="' . esc_attr( $atts['orange'] ) . '" d="M289.6 384h140v76h-140z"/> |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | * @return string |
370 | 370 | */ |
371 | 371 | public static function get_server_value( $value ) { |
372 | - return isset( $_SERVER[ $value ] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[ $value ] ) ) : ''; |
|
372 | + return isset( $_SERVER[$value] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[$value] ) ) : ''; |
|
373 | 373 | } |
374 | 374 | |
375 | 375 | /** |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | ); |
393 | 393 | $ip = ''; |
394 | 394 | foreach ( $ip_options as $key ) { |
395 | - if ( ! isset( $_SERVER[ $key ] ) ) { |
|
395 | + if ( ! isset( $_SERVER[$key] ) ) { |
|
396 | 396 | continue; |
397 | 397 | } |
398 | 398 | |
@@ -416,10 +416,10 @@ discard block |
||
416 | 416 | } |
417 | 417 | |
418 | 418 | if ( $src === 'get' ) { |
419 | - $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 |
|
420 | - if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
419 | + $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 |
|
420 | + if ( ! isset( $_POST[$param] ) && isset( $_GET[$param] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
421 | 421 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
422 | - $value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) ); |
|
422 | + $value = htmlspecialchars_decode( wp_unslash( $_GET[$param] ) ); |
|
423 | 423 | } |
424 | 424 | self::sanitize_value( $sanitize, $value ); |
425 | 425 | } else { |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | } |
441 | 441 | |
442 | 442 | $p = trim( $p, ']' ); |
443 | - $value = isset( $value[ $p ] ) ? $value[ $p ] : $default; |
|
443 | + $value = isset( $value[$p] ) ? $value[$p] : $default; |
|
444 | 444 | } |
445 | 445 | } |
446 | 446 | |
@@ -496,26 +496,26 @@ discard block |
||
496 | 496 | 'sanitize' => 'sanitize_text_field', |
497 | 497 | 'serialized' => false, |
498 | 498 | ); |
499 | - $args = wp_parse_args( $args, $defaults ); |
|
499 | + $args = wp_parse_args( $args, $defaults ); |
|
500 | 500 | |
501 | 501 | $value = $args['default']; |
502 | 502 | if ( $args['type'] == 'get' ) { |
503 | - if ( $_GET && isset( $_GET[ $args['param'] ] ) ) { |
|
503 | + if ( $_GET && isset( $_GET[$args['param']] ) ) { |
|
504 | 504 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
505 | - $value = wp_unslash( $_GET[ $args['param'] ] ); |
|
505 | + $value = wp_unslash( $_GET[$args['param']] ); |
|
506 | 506 | } |
507 | 507 | } elseif ( $args['type'] == 'post' ) { |
508 | - if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
508 | + if ( isset( $_POST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
509 | 509 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
510 | - $value = wp_unslash( $_POST[ $args['param'] ] ); |
|
510 | + $value = wp_unslash( $_POST[$args['param']] ); |
|
511 | 511 | if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) { |
512 | 512 | self::unserialize_or_decode( $value ); |
513 | 513 | } |
514 | 514 | } |
515 | 515 | } else { |
516 | - if ( isset( $_REQUEST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
516 | + if ( isset( $_REQUEST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
517 | 517 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
518 | - $value = wp_unslash( $_REQUEST[ $args['param'] ] ); |
|
518 | + $value = wp_unslash( $_REQUEST[$args['param']] ); |
|
519 | 519 | } |
520 | 520 | } |
521 | 521 | |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | if ( is_array( $value ) ) { |
548 | 548 | $temp_values = $value; |
549 | 549 | foreach ( $temp_values as $k => $v ) { |
550 | - self::sanitize_value( $sanitize, $value[ $k ] ); |
|
550 | + self::sanitize_value( $sanitize, $value[$k] ); |
|
551 | 551 | } |
552 | 552 | } else { |
553 | 553 | $value = call_user_func( $sanitize, $value ); |
@@ -558,8 +558,8 @@ discard block |
||
558 | 558 | public static function sanitize_request( $sanitize_method, &$values ) { |
559 | 559 | $temp_values = $values; |
560 | 560 | foreach ( $temp_values as $k => $val ) { |
561 | - if ( isset( $sanitize_method[ $k ] ) ) { |
|
562 | - $values[ $k ] = call_user_func( $sanitize_method[ $k ], $val ); |
|
561 | + if ( isset( $sanitize_method[$k] ) ) { |
|
562 | + $values[$k] = call_user_func( $sanitize_method[$k], $val ); |
|
563 | 563 | } |
564 | 564 | } |
565 | 565 | } |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | if ( is_array( $value ) ) { |
583 | 583 | $temp_values = $value; |
584 | 584 | foreach ( $temp_values as $k => $v ) { |
585 | - self::decode_specialchars( $value[ $k ] ); |
|
585 | + self::decode_specialchars( $value[$k] ); |
|
586 | 586 | } |
587 | 587 | } else { |
588 | 588 | self::decode_amp( $value ); |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | * @return array |
703 | 703 | */ |
704 | 704 | public static function add_allowed_submit_button_tags( $allowed_html ) { |
705 | - $allowed_html['input'] = array( |
|
705 | + $allowed_html['input'] = array( |
|
706 | 706 | 'type' => true, |
707 | 707 | 'value' => true, |
708 | 708 | 'formnovalidate' => true, |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | $allowed_html = $html; |
726 | 726 | } elseif ( ! empty( $allowed ) ) { |
727 | 727 | foreach ( (array) $allowed as $a ) { |
728 | - $allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array(); |
|
728 | + $allowed_html[$a] = isset( $html[$a] ) ? $html[$a] : array(); |
|
729 | 729 | } |
730 | 730 | } |
731 | 731 | |
@@ -904,8 +904,8 @@ discard block |
||
904 | 904 | } |
905 | 905 | |
906 | 906 | global $wp_query; |
907 | - if ( isset( $wp_query->query_vars[ $param ] ) ) { |
|
908 | - $value = $wp_query->query_vars[ $param ]; |
|
907 | + if ( isset( $wp_query->query_vars[$param] ) ) { |
|
908 | + $value = $wp_query->query_vars[$param]; |
|
909 | 909 | } |
910 | 910 | |
911 | 911 | return $value; |
@@ -932,9 +932,9 @@ discard block |
||
932 | 932 | $deprecated = array( |
933 | 933 | 'frm_clone_solid_icon' => 'frm_clone_icon', |
934 | 934 | ); |
935 | - if ( isset( $deprecated[ $icon ] ) ) { |
|
936 | - $icon = $deprecated[ $icon ]; |
|
937 | - $class = str_replace( $icon, $deprecated[ $icon ], $class ); |
|
935 | + if ( isset( $deprecated[$icon] ) ) { |
|
936 | + $icon = $deprecated[$icon]; |
|
937 | + $class = str_replace( $icon, $deprecated[$icon], $class ); |
|
938 | 938 | } |
939 | 939 | |
940 | 940 | if ( $icon === $class ) { |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | 'new_file_path' => self::plugin_path() . '/js', |
1256 | 1256 | ) |
1257 | 1257 | ); |
1258 | - $new_file = new FrmCreateFile( $file_atts ); |
|
1258 | + $new_file = new FrmCreateFile( $file_atts ); |
|
1259 | 1259 | |
1260 | 1260 | $files = array( |
1261 | 1261 | self::plugin_path() . '/js/formidable.min.js', |
@@ -1717,8 +1717,8 @@ discard block |
||
1717 | 1717 | return $error; |
1718 | 1718 | } |
1719 | 1719 | |
1720 | - $nonce_value = ( $_REQUEST && isset( $_REQUEST[ $nonce_name ] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $nonce_name ] ) ) : ''; |
|
1721 | - if ( $_REQUEST && ( ! isset( $_REQUEST[ $nonce_name ] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
1720 | + $nonce_value = ( $_REQUEST && isset( $_REQUEST[$nonce_name] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[$nonce_name] ) ) : ''; |
|
1721 | + if ( $_REQUEST && ( ! isset( $_REQUEST[$nonce_name] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
1722 | 1722 | $frm_settings = self::get_settings(); |
1723 | 1723 | $error = $frm_settings->admin_permission; |
1724 | 1724 | } |
@@ -1753,7 +1753,7 @@ discard block |
||
1753 | 1753 | } else { |
1754 | 1754 | foreach ( $value as $k => $v ) { |
1755 | 1755 | if ( ! is_array( $v ) ) { |
1756 | - $value[ $k ] = call_user_func( $original_function, $v ); |
|
1756 | + $value[$k] = call_user_func( $original_function, $v ); |
|
1757 | 1757 | } |
1758 | 1758 | } |
1759 | 1759 | } |
@@ -1778,7 +1778,7 @@ discard block |
||
1778 | 1778 | $return = array_merge( $return, self::array_flatten( $value, $keys ) ); |
1779 | 1779 | } else { |
1780 | 1780 | if ( $keys == 'keep' ) { |
1781 | - $return[ $key ] = $value; |
|
1781 | + $return[$key] = $value; |
|
1782 | 1782 | } else { |
1783 | 1783 | $return[] = $value; |
1784 | 1784 | } |
@@ -1831,11 +1831,11 @@ discard block |
||
1831 | 1831 | } |
1832 | 1832 | |
1833 | 1833 | $ver = $default; |
1834 | - if ( ! isset( $wp_scripts->registered[ $handle ] ) ) { |
|
1834 | + if ( ! isset( $wp_scripts->registered[$handle] ) ) { |
|
1835 | 1835 | return $ver; |
1836 | 1836 | } |
1837 | 1837 | |
1838 | - $query = $wp_scripts->registered[ $handle ]; |
|
1838 | + $query = $wp_scripts->registered[$handle]; |
|
1839 | 1839 | if ( is_object( $query ) && ! empty( $query->ver ) ) { |
1840 | 1840 | $ver = $query->ver; |
1841 | 1841 | } |
@@ -1941,7 +1941,7 @@ discard block |
||
1941 | 1941 | $suffix = 2; |
1942 | 1942 | do { |
1943 | 1943 | $key_check = $key . $separator . $suffix; |
1944 | - ++$suffix; |
|
1944 | + ++ $suffix; |
|
1945 | 1945 | } while ( in_array( $key_check, $similar_keys, true ) ); |
1946 | 1946 | |
1947 | 1947 | $key = $key_check; |
@@ -2042,7 +2042,7 @@ discard block |
||
2042 | 2042 | |
2043 | 2043 | foreach ( array( 'name', 'description' ) as $var ) { |
2044 | 2044 | $default_val = isset( $record->{$var} ) ? $record->{$var} : ''; |
2045 | - $values[ $var ] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
2045 | + $values[$var] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
2046 | 2046 | unset( $var, $default_val ); |
2047 | 2047 | } |
2048 | 2048 | |
@@ -2100,9 +2100,9 @@ discard block |
||
2100 | 2100 | } |
2101 | 2101 | } |
2102 | 2102 | |
2103 | - $field_type = isset( $post_values['field_options'][ 'type_' . $field->id ] ) ? $post_values['field_options'][ 'type_' . $field->id ] : $field->type; |
|
2104 | - if ( isset( $post_values['item_meta'][ $field->id ] ) ) { |
|
2105 | - $new_value = $post_values['item_meta'][ $field->id ]; |
|
2103 | + $field_type = isset( $post_values['field_options']['type_' . $field->id] ) ? $post_values['field_options']['type_' . $field->id] : $field->type; |
|
2104 | + if ( isset( $post_values['item_meta'][$field->id] ) ) { |
|
2105 | + $new_value = $post_values['item_meta'][$field->id]; |
|
2106 | 2106 | self::unserialize_or_decode( $new_value ); |
2107 | 2107 | } else { |
2108 | 2108 | $new_value = $meta_value; |
@@ -2123,7 +2123,7 @@ discard block |
||
2123 | 2123 | |
2124 | 2124 | $field_array = array_merge( (array) $field->field_options, $field_array ); |
2125 | 2125 | |
2126 | - $values['fields'][ $field->id ] = $field_array; |
|
2126 | + $values['fields'][$field->id] = $field_array; |
|
2127 | 2127 | } |
2128 | 2128 | |
2129 | 2129 | /** |
@@ -2170,11 +2170,11 @@ discard block |
||
2170 | 2170 | } |
2171 | 2171 | |
2172 | 2172 | foreach ( $form->options as $opt => $value ) { |
2173 | - if ( isset( $post_values[ $opt ] ) ) { |
|
2174 | - $values[ $opt ] = $post_values[ $opt ]; |
|
2175 | - self::unserialize_or_decode( $values[ $opt ] ); |
|
2173 | + if ( isset( $post_values[$opt] ) ) { |
|
2174 | + $values[$opt] = $post_values[$opt]; |
|
2175 | + self::unserialize_or_decode( $values[$opt] ); |
|
2176 | 2176 | } else { |
2177 | - $values[ $opt ] = $value; |
|
2177 | + $values[$opt] = $value; |
|
2178 | 2178 | } |
2179 | 2179 | } |
2180 | 2180 | |
@@ -2188,8 +2188,8 @@ discard block |
||
2188 | 2188 | $form_defaults = FrmFormsHelper::get_default_opts(); |
2189 | 2189 | |
2190 | 2190 | foreach ( $form_defaults as $opt => $default ) { |
2191 | - if ( ! isset( $values[ $opt ] ) || $values[ $opt ] == '' ) { |
|
2192 | - $values[ $opt ] = ( $post_values && isset( $post_values['options'][ $opt ] ) ) ? $post_values['options'][ $opt ] : $default; |
|
2191 | + if ( ! isset( $values[$opt] ) || $values[$opt] == '' ) { |
|
2192 | + $values[$opt] = ( $post_values && isset( $post_values['options'][$opt] ) ) ? $post_values['options'][$opt] : $default; |
|
2193 | 2193 | } |
2194 | 2194 | |
2195 | 2195 | unset( $opt, $default ); |
@@ -2200,8 +2200,8 @@ discard block |
||
2200 | 2200 | } |
2201 | 2201 | |
2202 | 2202 | foreach ( array( 'before', 'after', 'submit' ) as $h ) { |
2203 | - if ( ! isset( $values[ $h . '_html' ] ) ) { |
|
2204 | - $values[ $h . '_html' ] = ( isset( $post_values['options'][ $h . '_html' ] ) ? $post_values['options'][ $h . '_html' ] : FrmFormsHelper::get_default_html( $h ) ); |
|
2203 | + if ( ! isset( $values[$h . '_html'] ) ) { |
|
2204 | + $values[$h . '_html'] = ( isset( $post_values['options'][$h . '_html'] ) ? $post_values['options'][$h . '_html'] : FrmFormsHelper::get_default_html( $h ) ); |
|
2205 | 2205 | } |
2206 | 2206 | unset( $h ); |
2207 | 2207 | } |
@@ -2353,25 +2353,25 @@ discard block |
||
2353 | 2353 | if ( ! is_numeric( $levels ) ) { |
2354 | 2354 | // Show time in specified unit. |
2355 | 2355 | $levels = self::get_unit( $levels ); |
2356 | - if ( isset( $time_strings[ $levels ] ) ) { |
|
2356 | + if ( isset( $time_strings[$levels] ) ) { |
|
2357 | 2357 | $diff = array( |
2358 | 2358 | $levels => self::time_format( $levels, $diff ), |
2359 | 2359 | ); |
2360 | 2360 | $time_strings = array( |
2361 | - $levels => $time_strings[ $levels ], |
|
2361 | + $levels => $time_strings[$levels], |
|
2362 | 2362 | ); |
2363 | 2363 | } |
2364 | 2364 | $levels = 1; |
2365 | 2365 | } |
2366 | 2366 | |
2367 | 2367 | foreach ( $time_strings as $k => $v ) { |
2368 | - if ( isset( $diff[ $k ] ) && $diff[ $k ] ) { |
|
2369 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . ( $diff[ $k ] > 1 ? $v[1] : $v[0] ); |
|
2370 | - } elseif ( isset( $diff[ $k ] ) && count( $time_strings ) === 1 ) { |
|
2368 | + if ( isset( $diff[$k] ) && $diff[$k] ) { |
|
2369 | + $time_strings[$k] = $diff[$k] . ' ' . ( $diff[$k] > 1 ? $v[1] : $v[0] ); |
|
2370 | + } elseif ( isset( $diff[$k] ) && count( $time_strings ) === 1 ) { |
|
2371 | 2371 | // Account for 0. |
2372 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . $v[1]; |
|
2372 | + $time_strings[$k] = $diff[$k] . ' ' . $v[1]; |
|
2373 | 2373 | } else { |
2374 | - unset( $time_strings[ $k ] ); |
|
2374 | + unset( $time_strings[$k] ); |
|
2375 | 2375 | } |
2376 | 2376 | } |
2377 | 2377 | |
@@ -2390,8 +2390,8 @@ discard block |
||
2390 | 2390 | 'y' => 'y', |
2391 | 2391 | 'd' => 'days', |
2392 | 2392 | ); |
2393 | - if ( isset( $return[ $unit ] ) ) { |
|
2394 | - return $diff[ $return[ $unit ] ]; |
|
2393 | + if ( isset( $return[$unit] ) ) { |
|
2394 | + return $diff[$return[$unit]]; |
|
2395 | 2395 | } |
2396 | 2396 | |
2397 | 2397 | $total = $diff['days'] * self::convert_time( 'd', $unit ); |
@@ -2399,11 +2399,11 @@ discard block |
||
2399 | 2399 | $times = array( 'h', 'i', 's' ); |
2400 | 2400 | |
2401 | 2401 | foreach ( $times as $time ) { |
2402 | - if ( ! isset( $diff[ $time ] ) ) { |
|
2402 | + if ( ! isset( $diff[$time] ) ) { |
|
2403 | 2403 | continue; |
2404 | 2404 | } |
2405 | 2405 | |
2406 | - $total += $diff[ $time ] * self::convert_time( $time, $unit ); |
|
2406 | + $total += $diff[$time] * self::convert_time( $time, $unit ); |
|
2407 | 2407 | } |
2408 | 2408 | |
2409 | 2409 | return floor( $total ); |
@@ -2423,7 +2423,7 @@ discard block |
||
2423 | 2423 | 'y' => DAY_IN_SECONDS * 365.25, |
2424 | 2424 | ); |
2425 | 2425 | |
2426 | - return $convert[ $from ] / $convert[ $to ]; |
|
2426 | + return $convert[$from] / $convert[$to]; |
|
2427 | 2427 | } |
2428 | 2428 | |
2429 | 2429 | /** |
@@ -2431,7 +2431,7 @@ discard block |
||
2431 | 2431 | */ |
2432 | 2432 | private static function get_unit( $unit ) { |
2433 | 2433 | $units = self::get_time_strings(); |
2434 | - if ( isset( $units[ $unit ] ) || is_numeric( $unit ) ) { |
|
2434 | + if ( isset( $units[$unit] ) || is_numeric( $unit ) ) { |
|
2435 | 2435 | return $unit; |
2436 | 2436 | } |
2437 | 2437 | |
@@ -2542,17 +2542,17 @@ discard block |
||
2542 | 2542 | |
2543 | 2543 | case 1: |
2544 | 2544 | $l2 = $name; |
2545 | - self::add_value_to_array( $name, $l2, $this_val, $vars[ $l1 ] ); |
|
2545 | + self::add_value_to_array( $name, $l2, $this_val, $vars[$l1] ); |
|
2546 | 2546 | break; |
2547 | 2547 | |
2548 | 2548 | case 2: |
2549 | 2549 | $l3 = $name; |
2550 | - self::add_value_to_array( $name, $l3, $this_val, $vars[ $l1 ][ $l2 ] ); |
|
2550 | + self::add_value_to_array( $name, $l3, $this_val, $vars[$l1][$l2] ); |
|
2551 | 2551 | break; |
2552 | 2552 | |
2553 | 2553 | case 3: |
2554 | 2554 | $l4 = $name; |
2555 | - self::add_value_to_array( $name, $l4, $this_val, $vars[ $l1 ][ $l2 ][ $l3 ] ); |
|
2555 | + self::add_value_to_array( $name, $l4, $this_val, $vars[$l1][$l2][$l3] ); |
|
2556 | 2556 | } |
2557 | 2557 | |
2558 | 2558 | unset( $this_val, $n ); |
@@ -2571,8 +2571,8 @@ discard block |
||
2571 | 2571 | public static function add_value_to_array( $name, $l1, $val, &$vars ) { |
2572 | 2572 | if ( $name == '' ) { |
2573 | 2573 | $vars[] = $val; |
2574 | - } elseif ( ! isset( $vars[ $l1 ] ) ) { |
|
2575 | - $vars[ $l1 ] = $val; |
|
2574 | + } elseif ( ! isset( $vars[$l1] ) ) { |
|
2575 | + $vars[$l1] = $val; |
|
2576 | 2576 | } |
2577 | 2577 | } |
2578 | 2578 | |
@@ -2588,7 +2588,7 @@ discard block |
||
2588 | 2588 | 'email_subject' => esc_attr( sprintf( __( 'If you leave the subject blank, the default will be used: %1$s Form submitted on %2$s', 'formidable' ), $form_name, self::site_name() ) ), |
2589 | 2589 | ); |
2590 | 2590 | |
2591 | - if ( ! isset( $tooltips[ $name ] ) ) { |
|
2591 | + if ( ! isset( $tooltips[$name] ) ) { |
|
2592 | 2592 | return; |
2593 | 2593 | } |
2594 | 2594 | |
@@ -2598,7 +2598,7 @@ discard block |
||
2598 | 2598 | echo ' class="frm_help"'; |
2599 | 2599 | } |
2600 | 2600 | |
2601 | - echo ' title="' . esc_attr( $tooltips[ $name ] ); |
|
2601 | + echo ' title="' . esc_attr( $tooltips[$name] ); |
|
2602 | 2602 | |
2603 | 2603 | if ( 'open' != $class ) { |
2604 | 2604 | echo '"'; |
@@ -2657,13 +2657,13 @@ discard block |
||
2657 | 2657 | } |
2658 | 2658 | |
2659 | 2659 | private static function prepare_action_slashes( $val, $key, &$post_content ) { |
2660 | - if ( ! isset( $post_content[ $key ] ) || is_numeric( $val ) ) { |
|
2660 | + if ( ! isset( $post_content[$key] ) || is_numeric( $val ) ) { |
|
2661 | 2661 | return; |
2662 | 2662 | } |
2663 | 2663 | |
2664 | 2664 | if ( is_array( $val ) ) { |
2665 | 2665 | foreach ( $val as $k1 => $v1 ) { |
2666 | - self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] ); |
|
2666 | + self::prepare_action_slashes( $v1, $k1, $post_content[$key] ); |
|
2667 | 2667 | unset( $k1, $v1 ); |
2668 | 2668 | } |
2669 | 2669 | } else { |
@@ -2671,7 +2671,7 @@ discard block |
||
2671 | 2671 | $val = stripslashes( $val ); |
2672 | 2672 | |
2673 | 2673 | // Add backslashes before double quotes and forward slashes only |
2674 | - $post_content[ $key ] = addcslashes( $val, '"\\/' ); |
|
2674 | + $post_content[$key] = addcslashes( $val, '"\\/' ); |
|
2675 | 2675 | } |
2676 | 2676 | } |
2677 | 2677 | |
@@ -2734,14 +2734,14 @@ discard block |
||
2734 | 2734 | continue; |
2735 | 2735 | } |
2736 | 2736 | $key = $input['name']; |
2737 | - if ( isset( $formatted[ $key ] ) ) { |
|
2738 | - if ( is_array( $formatted[ $key ] ) ) { |
|
2739 | - $formatted[ $key ][] = $input['value']; |
|
2737 | + if ( isset( $formatted[$key] ) ) { |
|
2738 | + if ( is_array( $formatted[$key] ) ) { |
|
2739 | + $formatted[$key][] = $input['value']; |
|
2740 | 2740 | } else { |
2741 | - $formatted[ $key ] = array( $formatted[ $key ], $input['value'] ); |
|
2741 | + $formatted[$key] = array( $formatted[$key], $input['value'] ); |
|
2742 | 2742 | } |
2743 | 2743 | } else { |
2744 | - $formatted[ $key ] = $input['value']; |
|
2744 | + $formatted[$key] = $input['value']; |
|
2745 | 2745 | } |
2746 | 2746 | } |
2747 | 2747 | |
@@ -3403,8 +3403,8 @@ discard block |
||
3403 | 3403 | } |
3404 | 3404 | |
3405 | 3405 | foreach ( $keys as $key ) { |
3406 | - if ( isset( $values[ $key ] ) ) { |
|
3407 | - $values[ $key ] = self::kses( $values[ $key ], 'all' ); |
|
3406 | + if ( isset( $values[$key] ) ) { |
|
3407 | + $values[$key] = self::kses( $values[$key], 'all' ); |
|
3408 | 3408 | } |
3409 | 3409 | } |
3410 | 3410 | |
@@ -3563,7 +3563,7 @@ discard block |
||
3563 | 3563 | return 0; |
3564 | 3564 | } |
3565 | 3565 | |
3566 | - return strlen( $parts[ count( $parts ) - 1 ] ); |
|
3566 | + return strlen( $parts[count( $parts ) - 1] ); |
|
3567 | 3567 | } |
3568 | 3568 | |
3569 | 3569 | /** |