@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | if ( in_array( $type, array( 'data', 'lookup' ), true ) ) { |
| 39 | 39 | $values['field_options']['data_type'] = $setting; |
| 40 | 40 | } else { |
| 41 | - $values['field_options'][ $setting ] = 1; |
|
| 41 | + $values['field_options'][$setting] = 1; |
|
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
@@ -164,10 +164,10 @@ discard block |
||
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | foreach ( $defaults as $opt => $default ) { |
| 167 | - $values[ $opt ] = $field->field_options[ $opt ] ?? $default; |
|
| 167 | + $values[$opt] = $field->field_options[$opt] ?? $default; |
|
| 168 | 168 | |
| 169 | 169 | if ( $check_post ) { |
| 170 | - self::get_posted_field_setting( $opt . '_' . $field->id, $values[ $opt ] ); |
|
| 170 | + self::get_posted_field_setting( $opt . '_' . $field->id, $values[$opt] ); |
|
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | return self::$context_is_safe_to_load_field_options_from_request_data; |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | - $function = function () { |
|
| 187 | + $function = function() { |
|
| 188 | 188 | if ( ! FrmAppHelper::is_admin_page() ) { |
| 189 | 189 | return false; |
| 190 | 190 | } |
@@ -292,12 +292,12 @@ discard block |
||
| 292 | 292 | * @param mixed $value |
| 293 | 293 | */ |
| 294 | 294 | private static function get_posted_field_setting( $setting, &$value ) { |
| 295 | - if ( ! isset( $_POST['field_options'][ $setting ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 295 | + if ( ! isset( $_POST['field_options'][$setting] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 296 | 296 | return; |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | if ( strpos( $setting, 'html' ) !== false ) { |
| 300 | - $value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 300 | + $value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 301 | 301 | |
| 302 | 302 | // Conditionally strip script tags if the user sending $_POST data is not allowed to use unfiltered HTML. |
| 303 | 303 | if ( ! FrmAppHelper::allow_unfiltered_html() ) { |
@@ -305,9 +305,9 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | } elseif ( strpos( $setting, 'format_' ) === 0 ) { |
| 307 | 307 | // TODO: Remove stripslashes on output, and use on input only. |
| 308 | - $value = sanitize_text_field( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing |
|
| 308 | + $value = sanitize_text_field( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing |
|
| 309 | 309 | } else { |
| 310 | - $value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 310 | + $value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 311 | 311 | FrmAppHelper::sanitize_value( 'wp_kses_post', $value ); |
| 312 | 312 | } |
| 313 | 313 | } |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | $values['default_value'] = FrmAppHelper::maybe_json_encode( $field->default_value ); |
| 381 | 381 | |
| 382 | 382 | foreach ( array( 'name', 'description', 'type', 'field_order', 'field_options', 'required' ) as $col ) { |
| 383 | - $values[ $col ] = $field->{$col}; |
|
| 383 | + $values[$col] = $field->{$col}; |
|
| 384 | 384 | } |
| 385 | 385 | } |
| 386 | 386 | |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | $defaults = apply_filters( 'frm_default_field_validation_messages', $defaults, $field ); |
| 424 | 424 | |
| 425 | 425 | $msg = FrmField::get_option( $field, $error ); |
| 426 | - $msg = empty( $msg ) ? $defaults[ $error ]['part'] : $msg; |
|
| 426 | + $msg = empty( $msg ) ? $defaults[$error]['part'] : $msg; |
|
| 427 | 427 | $msg = do_shortcode( $msg ); |
| 428 | 428 | |
| 429 | 429 | $msg = self::maybe_replace_substrings_with_field_name( $msg, $error, $field ); |
@@ -693,7 +693,7 @@ discard block |
||
| 693 | 693 | 'inside_class' => 'inside', |
| 694 | 694 | 'dismiss-icon' => true, |
| 695 | 695 | ); |
| 696 | - $args = array_merge( $defaults, $args ); |
|
| 696 | + $args = array_merge( $defaults, $args ); |
|
| 697 | 697 | |
| 698 | 698 | include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/inline-modal.php'; |
| 699 | 699 | } |
@@ -931,7 +931,7 @@ discard block |
||
| 931 | 931 | continue; |
| 932 | 932 | } |
| 933 | 933 | |
| 934 | - $atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][ $short_key ] ); |
|
| 934 | + $atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][$short_key] ); |
|
| 935 | 935 | $tag = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key ); |
| 936 | 936 | |
| 937 | 937 | $atts['entry'] = $entry; |
@@ -941,7 +941,7 @@ discard block |
||
| 941 | 941 | if ( $replace_with !== null ) { |
| 942 | 942 | $replace_with = self::trigger_shortcode_atts( $replace_with, $atts ); |
| 943 | 943 | self::sanitize_embedded_shortcodes( compact( 'entry' ), $replace_with ); |
| 944 | - $content = str_replace( $shortcodes[0][ $short_key ], $replace_with, $content ); |
|
| 944 | + $content = str_replace( $shortcodes[0][$short_key], $replace_with, $content ); |
|
| 945 | 945 | } |
| 946 | 946 | |
| 947 | 947 | unset( $atts, $replace_with ); |
@@ -959,7 +959,7 @@ discard block |
||
| 959 | 959 | $supported_atts = array( 'remove_accents', 'sanitize', 'sanitize_url' ); |
| 960 | 960 | $included_atts = array_intersect( $supported_atts, array_keys( $atts ) ); |
| 961 | 961 | foreach ( $included_atts as $included_att ) { |
| 962 | - if ( '0' === $atts[ $included_att ] ) { |
|
| 962 | + if ( '0' === $atts[$included_att] ) { |
|
| 963 | 963 | // Skip any option that uses 0 so sanitize_url=0 does not encode. |
| 964 | 964 | continue; |
| 965 | 965 | } |
@@ -1037,8 +1037,8 @@ discard block |
||
| 1037 | 1037 | |
| 1038 | 1038 | $dynamic_default = array( 'admin_email', 'siteurl', 'frmurl', 'sitename', 'get', 'default-email', 'default-from-email' ); |
| 1039 | 1039 | |
| 1040 | - if ( isset( $shortcode_values[ $atts['tag'] ] ) ) { |
|
| 1041 | - $replace_with = $shortcode_values[ $atts['tag'] ]; |
|
| 1040 | + if ( isset( $shortcode_values[$atts['tag']] ) ) { |
|
| 1041 | + $replace_with = $shortcode_values[$atts['tag']]; |
|
| 1042 | 1042 | } elseif ( in_array( $atts['tag'], $dynamic_default, true ) ) { |
| 1043 | 1043 | $replace_with = self::dynamic_default_values( $atts['tag'], $atts ); |
| 1044 | 1044 | } elseif ( $clean_tag === 'user_agent' ) { |
@@ -1262,8 +1262,8 @@ discard block |
||
| 1262 | 1262 | self::field_types_for_input( $single_input, $field_selection, $field_types ); |
| 1263 | 1263 | } elseif ( in_array( $type, $multiple_input, true ) ) { |
| 1264 | 1264 | self::field_types_for_input( $multiple_input, $field_selection, $field_types ); |
| 1265 | - } elseif ( isset( $field_selection[ $type ] ) ) { |
|
| 1266 | - $field_types[ $type ] = $field_selection[ $type ]; |
|
| 1265 | + } elseif ( isset( $field_selection[$type] ) ) { |
|
| 1266 | + $field_types[$type] = $field_selection[$type]; |
|
| 1267 | 1267 | } |
| 1268 | 1268 | |
| 1269 | 1269 | $field_types = apply_filters( 'frm_switch_field_types', $field_types, compact( 'type', 'field_selection' ) ); |
@@ -1305,7 +1305,7 @@ discard block |
||
| 1305 | 1305 | foreach ( $inputs as $input ) { |
| 1306 | 1306 | // This may not be set if a field type was removed using the frm_available_fields or frm_pro_available_fields filters. |
| 1307 | 1307 | if ( array_key_exists( $input, $fields ) ) { |
| 1308 | - $field_types[ $input ] = $fields[ $input ]; |
|
| 1308 | + $field_types[$input] = $fields[$input]; |
|
| 1309 | 1309 | } |
| 1310 | 1310 | unset( $input ); |
| 1311 | 1311 | } |
@@ -1338,7 +1338,7 @@ discard block |
||
| 1338 | 1338 | 'parent' => false, |
| 1339 | 1339 | 'pointer' => false, |
| 1340 | 1340 | ); |
| 1341 | - $args = wp_parse_args( $args, $defaults ); |
|
| 1341 | + $args = wp_parse_args( $args, $defaults ); |
|
| 1342 | 1342 | |
| 1343 | 1343 | $opt_key = $args['opt_key']; |
| 1344 | 1344 | $field = $args['field']; |
@@ -1354,25 +1354,25 @@ discard block |
||
| 1354 | 1354 | |
| 1355 | 1355 | // Check posted vals before checking saved values |
| 1356 | 1356 | // For fields inside repeating sections - note, don't check if $pointer is true because it will often be zero |
| 1357 | - if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1357 | + if ( $parent && isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1358 | 1358 | if ( FrmField::is_field_with_multiple_values( $field ) ) { |
| 1359 | 1359 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 1360 | - $other_val = isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ][ $opt_key ] ) ) : ''; |
|
| 1360 | + $other_val = isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']][$opt_key] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']][$opt_key] ) ) : ''; |
|
| 1361 | 1361 | } else { |
| 1362 | - $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1362 | + $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1363 | 1363 | } |
| 1364 | 1364 | |
| 1365 | 1365 | return $other_val; |
| 1366 | 1366 | } |
| 1367 | 1367 | |
| 1368 | - if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1368 | + if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1369 | 1369 | // For normal fields |
| 1370 | 1370 | |
| 1371 | 1371 | if ( FrmField::is_field_with_multiple_values( $field ) ) { |
| 1372 | 1372 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 1373 | - $other_val = isset( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ) : ''; |
|
| 1373 | + $other_val = isset( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ) : ''; |
|
| 1374 | 1374 | } else { |
| 1375 | - $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1375 | + $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1376 | 1376 | } |
| 1377 | 1377 | |
| 1378 | 1378 | return $other_val; |
@@ -1382,8 +1382,8 @@ discard block |
||
| 1382 | 1382 | if ( $field['type'] === 'checkbox' && is_array( $field['value'] ) ) { |
| 1383 | 1383 | // Check if there is an "other" val in saved value and make sure the |
| 1384 | 1384 | // "other" val is not equal to the Other checkbox option |
| 1385 | - if ( isset( $field['value'][ $opt_key ] ) && $field['options'][ $opt_key ] != $field['value'][ $opt_key ] ) { |
|
| 1386 | - $other_val = $field['value'][ $opt_key ]; |
|
| 1385 | + if ( isset( $field['value'][$opt_key] ) && $field['options'][$opt_key] != $field['value'][$opt_key] ) { |
|
| 1386 | + $other_val = $field['value'][$opt_key]; |
|
| 1387 | 1387 | } |
| 1388 | 1388 | } else { |
| 1389 | 1389 | /** |
@@ -1395,8 +1395,8 @@ discard block |
||
| 1395 | 1395 | // Multi-select dropdowns - key is not preserved |
| 1396 | 1396 | if ( is_array( $field['value'] ) ) { |
| 1397 | 1397 | $o_key = array_search( $temp_val, $field['value'] ); |
| 1398 | - if ( isset( $field['value'][ $o_key ] ) ) { |
|
| 1399 | - unset( $field['value'][ $o_key ], $o_key ); |
|
| 1398 | + if ( isset( $field['value'][$o_key] ) ) { |
|
| 1399 | + unset( $field['value'][$o_key], $o_key ); |
|
| 1400 | 1400 | } |
| 1401 | 1401 | } elseif ( $temp_val == $field['value'] ) { |
| 1402 | 1402 | // For radio and regular dropdowns |
@@ -1607,11 +1607,11 @@ discard block |
||
| 1607 | 1607 | foreach ( $val as $k => $v ) { |
| 1608 | 1608 | if ( is_string( $v ) ) { |
| 1609 | 1609 | if ( 'custom_html' === $k ) { |
| 1610 | - $val[ $k ] = self::switch_ids_except_strings( $replace, $replace_with, array( '[if description]', '[description]', '[/if description]' ), $v ); |
|
| 1610 | + $val[$k] = self::switch_ids_except_strings( $replace, $replace_with, array( '[if description]', '[description]', '[/if description]' ), $v ); |
|
| 1611 | 1611 | unset( $k, $v ); |
| 1612 | 1612 | continue; |
| 1613 | 1613 | } |
| 1614 | - $val[ $k ] = str_replace( $replace, $replace_with, $v ); |
|
| 1614 | + $val[$k] = str_replace( $replace, $replace_with, $v ); |
|
| 1615 | 1615 | unset( $k, $v ); |
| 1616 | 1616 | } |
| 1617 | 1617 | } |
@@ -1640,8 +1640,8 @@ discard block |
||
| 1640 | 1640 | if ( false === $index ) { |
| 1641 | 1641 | continue; |
| 1642 | 1642 | } |
| 1643 | - unset( $replace[ $index ] ); |
|
| 1644 | - unset( $replace_with[ $index ] ); |
|
| 1643 | + unset( $replace[$index] ); |
|
| 1644 | + unset( $replace_with[$index] ); |
|
| 1645 | 1645 | } |
| 1646 | 1646 | $value = str_replace( $replace, $replace_with, $value ); |
| 1647 | 1647 | return $value; |
@@ -1989,7 +1989,7 @@ discard block |
||
| 1989 | 1989 | $countries['class'] = 'frm-countries-opts'; |
| 1990 | 1990 | } |
| 1991 | 1991 | |
| 1992 | - $prepop[ __( 'Countries', 'formidable' ) ] = $countries; |
|
| 1992 | + $prepop[__( 'Countries', 'formidable' )] = $countries; |
|
| 1993 | 1993 | |
| 1994 | 1994 | // State abv. |
| 1995 | 1995 | $states = self::get_us_states(); |
@@ -1999,7 +1999,7 @@ discard block |
||
| 1999 | 1999 | $state_abv['class'] = 'frm-state-abv-opts'; |
| 2000 | 2000 | } |
| 2001 | 2001 | |
| 2002 | - $prepop[ __( 'U.S. State Abbreviations', 'formidable' ) ] = $state_abv; |
|
| 2002 | + $prepop[__( 'U.S. State Abbreviations', 'formidable' )] = $state_abv; |
|
| 2003 | 2003 | |
| 2004 | 2004 | // States. |
| 2005 | 2005 | $states = array_values( $states ); |
@@ -2008,7 +2008,7 @@ discard block |
||
| 2008 | 2008 | $states['class'] = 'frm-states-opts'; |
| 2009 | 2009 | } |
| 2010 | 2010 | |
| 2011 | - $prepop[ __( 'U.S. States', 'formidable' ) ] = $states; |
|
| 2011 | + $prepop[__( 'U.S. States', 'formidable' )] = $states; |
|
| 2012 | 2012 | unset( $state_abv, $states ); |
| 2013 | 2013 | |
| 2014 | 2014 | // Age. |
@@ -2026,7 +2026,7 @@ discard block |
||
| 2026 | 2026 | $ages['class'] = 'frm-age-opts'; |
| 2027 | 2027 | } |
| 2028 | 2028 | |
| 2029 | - $prepop[ __( 'Age', 'formidable' ) ] = $ages; |
|
| 2029 | + $prepop[__( 'Age', 'formidable' )] = $ages; |
|
| 2030 | 2030 | |
| 2031 | 2031 | // Satisfaction. |
| 2032 | 2032 | $satisfaction = array( |
@@ -2041,7 +2041,7 @@ discard block |
||
| 2041 | 2041 | $satisfaction['class'] = 'frm-satisfaction-opts'; |
| 2042 | 2042 | } |
| 2043 | 2043 | |
| 2044 | - $prepop[ __( 'Satisfaction', 'formidable' ) ] = $satisfaction; |
|
| 2044 | + $prepop[__( 'Satisfaction', 'formidable' )] = $satisfaction; |
|
| 2045 | 2045 | |
| 2046 | 2046 | // Importance. |
| 2047 | 2047 | $importance = array( |
@@ -2056,7 +2056,7 @@ discard block |
||
| 2056 | 2056 | $importance['class'] = 'frm-importance-opts'; |
| 2057 | 2057 | } |
| 2058 | 2058 | |
| 2059 | - $prepop[ __( 'Importance', 'formidable' ) ] = $importance; |
|
| 2059 | + $prepop[__( 'Importance', 'formidable' )] = $importance; |
|
| 2060 | 2060 | |
| 2061 | 2061 | // Agreement. |
| 2062 | 2062 | $agreement = array( |
@@ -2071,7 +2071,7 @@ discard block |
||
| 2071 | 2071 | $agreement['class'] = 'frm-agreement-opts'; |
| 2072 | 2072 | } |
| 2073 | 2073 | |
| 2074 | - $prepop[ __( 'Agreement', 'formidable' ) ] = $agreement; |
|
| 2074 | + $prepop[__( 'Agreement', 'formidable' )] = $agreement; |
|
| 2075 | 2075 | |
| 2076 | 2076 | // Likely. |
| 2077 | 2077 | $likely = array( |
@@ -2086,7 +2086,7 @@ discard block |
||
| 2086 | 2086 | $likely['class'] = 'frm-likely-opts'; |
| 2087 | 2087 | } |
| 2088 | 2088 | |
| 2089 | - $prepop[ __( 'Likely', 'formidable' ) ] = $likely; |
|
| 2089 | + $prepop[__( 'Likely', 'formidable' )] = $likely; |
|
| 2090 | 2090 | |
| 2091 | 2091 | $prepop = apply_filters( 'frm_bulk_field_choices', $prepop ); |
| 2092 | 2092 | } |
@@ -2307,16 +2307,16 @@ discard block |
||
| 2307 | 2307 | */ |
| 2308 | 2308 | private static function fill_image_setting_options( $options, &$args ) { |
| 2309 | 2309 | foreach ( $options as $key => $option ) { |
| 2310 | - $args['options'][ $key ] = $option; |
|
| 2310 | + $args['options'][$key] = $option; |
|
| 2311 | 2311 | |
| 2312 | 2312 | if ( ! empty( $option['addon'] ) ) { |
| 2313 | - $args['options'][ $key ]['custom_attrs'] = self::fill_image_setting_addon_link( $option ); |
|
| 2313 | + $args['options'][$key]['custom_attrs'] = self::fill_image_setting_addon_link( $option ); |
|
| 2314 | 2314 | } |
| 2315 | 2315 | |
| 2316 | - unset( $args['options'][ $key ]['addon'] ); |
|
| 2316 | + unset( $args['options'][$key]['addon'] ); |
|
| 2317 | 2317 | $fill = array( 'upgrade', 'message', 'content' ); |
| 2318 | 2318 | foreach ( $fill as $f ) { |
| 2319 | - unset( $args['options'][ $key ][ $f ], $f ); |
|
| 2319 | + unset( $args['options'][$key][$f], $f ); |
|
| 2320 | 2320 | } |
| 2321 | 2321 | } |
| 2322 | 2322 | } |
@@ -2337,8 +2337,8 @@ discard block |
||
| 2337 | 2337 | |
| 2338 | 2338 | $fill = array( 'upgrade', 'message', 'content' ); |
| 2339 | 2339 | foreach ( $fill as $f ) { |
| 2340 | - if ( isset( $option[ $f ] ) ) { |
|
| 2341 | - $custom_attrs[ 'data-' . $f ] = $option[ $f ]; |
|
| 2340 | + if ( isset( $option[$f] ) ) { |
|
| 2341 | + $custom_attrs['data-' . $f] = $option[$f]; |
|
| 2342 | 2342 | } |
| 2343 | 2343 | } |
| 2344 | 2344 | |
@@ -2404,7 +2404,7 @@ discard block |
||
| 2404 | 2404 | |
| 2405 | 2405 | return array_filter( |
| 2406 | 2406 | $rows, |
| 2407 | - function ( $row ) { |
|
| 2407 | + function( $row ) { |
|
| 2408 | 2408 | FrmAppHelper::unserialize_or_decode( $row->field_options ); |
| 2409 | 2409 | return is_array( $row->field_options ) && ! empty( $row->field_options['draft'] ); |
| 2410 | 2410 | } |
@@ -2467,7 +2467,7 @@ discard block |
||
| 2467 | 2467 | if ( empty( $attributes['data-fid'] ) ) { |
| 2468 | 2468 | unset( $data['plugin-status'] ); |
| 2469 | 2469 | foreach ( $data as $key => $value ) { |
| 2470 | - $attributes[ 'data-' . $key ] = $value; |
|
| 2470 | + $attributes['data-' . $key] = $value; |
|
| 2471 | 2471 | } |
| 2472 | 2472 | } |
| 2473 | 2473 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | if ( isset( $shortcode_atts ) && isset( $shortcode_atts['opt'] ) && $shortcode_atts['opt'] !== $opt_key ) { |
| 25 | 25 | continue; |
| 26 | 26 | } |
| 27 | - $choice_limit_reached = $field_choices_limit_reached_statuses[ $opt_key ] ?? false; |
|
| 27 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key] ?? false; |
|
| 28 | 28 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 29 | 29 | continue; |
| 30 | 30 | } |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | foreach ( $field['options'] as $opt_key => $opt ) { |
| 55 | - $choice_limit_reached = $field_choices_limit_reached_statuses[ $opt_key ]; |
|
| 55 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key]; |
|
| 56 | 56 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 57 | 57 | continue; |
| 58 | 58 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | if ( isset( $shortcode_atts ) && isset( $shortcode_atts['opt'] ) && $shortcode_atts['opt'] !== $opt_key ) { |
| 26 | 26 | continue; |
| 27 | 27 | } |
| 28 | - $choice_limit_reached = $field_choices_limit_reached_statuses[ $opt_key ] ?? false; |
|
| 28 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key] ?? false; |
|
| 29 | 29 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 30 | 30 | continue; |
| 31 | 31 | } |
@@ -107,6 +107,6 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | ?></div> |
| 109 | 109 | <?php |
| 110 | - ++$option_index; |
|
| 110 | + ++ $option_index; |
|
| 111 | 111 | }//end foreach |
| 112 | 112 | }//end if |