@@ -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 | } |
@@ -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 |
@@ -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 ] ?? false; |
|
| 55 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key] ?? false; |
|
| 56 | 56 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 57 | 57 | continue; |
| 58 | 58 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if ( in_array( $type, array( 'data', 'lookup' ), true ) ) { |
| 45 | 45 | $values['field_options']['data_type'] = $setting; |
| 46 | 46 | } else { |
| 47 | - $values['field_options'][ $setting ] = 1; |
|
| 47 | + $values['field_options'][$setting] = 1; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
@@ -209,10 +209,10 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | foreach ( $defaults as $opt => $default ) { |
| 212 | - $values[ $opt ] = $field->field_options[ $opt ] ?? $default; |
|
| 212 | + $values[$opt] = $field->field_options[$opt] ?? $default; |
|
| 213 | 213 | |
| 214 | 214 | if ( $check_post ) { |
| 215 | - self::get_posted_field_setting( $opt . '_' . $field->id, $values[ $opt ] ); |
|
| 215 | + self::get_posted_field_setting( $opt . '_' . $field->id, $values[$opt] ); |
|
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | return self::$context_is_safe_to_load_field_options_from_request_data; |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | - $function = function () { |
|
| 232 | + $function = function() { |
|
| 233 | 233 | if ( ! FrmAppHelper::is_admin_page() ) { |
| 234 | 234 | return false; |
| 235 | 235 | } |
@@ -343,12 +343,12 @@ discard block |
||
| 343 | 343 | * @return void |
| 344 | 344 | */ |
| 345 | 345 | private static function get_posted_field_setting( $setting, &$value ) { |
| 346 | - if ( ! isset( $_POST['field_options'][ $setting ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 346 | + if ( ! isset( $_POST['field_options'][$setting] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 347 | 347 | return; |
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | if ( strpos( $setting, 'html' ) !== false ) { |
| 351 | - $value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 351 | + $value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 352 | 352 | |
| 353 | 353 | // Conditionally strip script tags if the user sending $_POST data is not allowed to use unfiltered HTML. |
| 354 | 354 | if ( ! FrmAppHelper::allow_unfiltered_html() ) { |
@@ -356,9 +356,9 @@ discard block |
||
| 356 | 356 | } |
| 357 | 357 | } elseif ( strpos( $setting, 'format_' ) === 0 ) { |
| 358 | 358 | // TODO: Remove stripslashes on output, and use on input only. |
| 359 | - $value = sanitize_text_field( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing |
|
| 359 | + $value = sanitize_text_field( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing |
|
| 360 | 360 | } else { |
| 361 | - $value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 361 | + $value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 362 | 362 | FrmAppHelper::sanitize_value( 'wp_kses_post', $value ); |
| 363 | 363 | } |
| 364 | 364 | } |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | $values['default_value'] = FrmAppHelper::maybe_json_encode( $field->default_value ); |
| 443 | 443 | |
| 444 | 444 | foreach ( array( 'name', 'description', 'type', 'field_order', 'field_options', 'required' ) as $col ) { |
| 445 | - $values[ $col ] = $field->{$col}; |
|
| 445 | + $values[$col] = $field->{$col}; |
|
| 446 | 446 | } |
| 447 | 447 | } |
| 448 | 448 | |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | $defaults = apply_filters( 'frm_default_field_validation_messages', $defaults, $field ); |
| 489 | 489 | |
| 490 | 490 | $msg = FrmField::get_option( $field, $error ); |
| 491 | - $msg = empty( $msg ) ? $defaults[ $error ]['part'] : $msg; |
|
| 491 | + $msg = empty( $msg ) ? $defaults[$error]['part'] : $msg; |
|
| 492 | 492 | $msg = do_shortcode( $msg ); |
| 493 | 493 | |
| 494 | 494 | $msg = self::maybe_replace_substrings_with_field_name( $msg, $error, $field ); |
@@ -825,7 +825,7 @@ discard block |
||
| 825 | 825 | 'inside_class' => 'inside', |
| 826 | 826 | 'dismiss-icon' => true, |
| 827 | 827 | ); |
| 828 | - $args = array_merge( $defaults, $args ); |
|
| 828 | + $args = array_merge( $defaults, $args ); |
|
| 829 | 829 | |
| 830 | 830 | include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/inline-modal.php'; |
| 831 | 831 | } |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | continue; |
| 1117 | 1117 | } |
| 1118 | 1118 | |
| 1119 | - $atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][ $short_key ] ); |
|
| 1119 | + $atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][$short_key] ); |
|
| 1120 | 1120 | $tag = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key ); |
| 1121 | 1121 | |
| 1122 | 1122 | $atts['entry'] = $entry; |
@@ -1126,7 +1126,7 @@ discard block |
||
| 1126 | 1126 | if ( $replace_with !== null ) { |
| 1127 | 1127 | $replace_with = self::trigger_shortcode_atts( $replace_with, $atts ); |
| 1128 | 1128 | self::sanitize_embedded_shortcodes( compact( 'entry' ), $replace_with ); |
| 1129 | - $content = str_replace( $shortcodes[0][ $short_key ], $replace_with, $content ); |
|
| 1129 | + $content = str_replace( $shortcodes[0][$short_key], $replace_with, $content ); |
|
| 1130 | 1130 | } |
| 1131 | 1131 | |
| 1132 | 1132 | unset( $atts, $replace_with ); |
@@ -1146,7 +1146,7 @@ discard block |
||
| 1146 | 1146 | $included_atts = array_intersect( $supported_atts, array_keys( $atts ) ); |
| 1147 | 1147 | |
| 1148 | 1148 | foreach ( $included_atts as $included_att ) { |
| 1149 | - if ( '0' === $atts[ $included_att ] ) { |
|
| 1149 | + if ( '0' === $atts[$included_att] ) { |
|
| 1150 | 1150 | // Skip any option that uses 0 so sanitize_url=0 does not encode. |
| 1151 | 1151 | continue; |
| 1152 | 1152 | } |
@@ -1229,8 +1229,8 @@ discard block |
||
| 1229 | 1229 | |
| 1230 | 1230 | $dynamic_default = array( 'admin_email', 'siteurl', 'frmurl', 'sitename', 'get', 'default-email', 'default-from-email' ); |
| 1231 | 1231 | |
| 1232 | - if ( isset( $shortcode_values[ $atts['tag'] ] ) ) { |
|
| 1233 | - $replace_with = $shortcode_values[ $atts['tag'] ]; |
|
| 1232 | + if ( isset( $shortcode_values[$atts['tag']] ) ) { |
|
| 1233 | + $replace_with = $shortcode_values[$atts['tag']]; |
|
| 1234 | 1234 | } elseif ( in_array( $atts['tag'], $dynamic_default, true ) ) { |
| 1235 | 1235 | $replace_with = self::dynamic_default_values( $atts['tag'], $atts ); |
| 1236 | 1236 | } elseif ( $clean_tag === 'user_agent' ) { |
@@ -1479,8 +1479,8 @@ discard block |
||
| 1479 | 1479 | self::field_types_for_input( $single_input, $field_selection, $field_types ); |
| 1480 | 1480 | } elseif ( in_array( $type, $multiple_input, true ) ) { |
| 1481 | 1481 | self::field_types_for_input( $multiple_input, $field_selection, $field_types ); |
| 1482 | - } elseif ( isset( $field_selection[ $type ] ) ) { |
|
| 1483 | - $field_types[ $type ] = $field_selection[ $type ]; |
|
| 1482 | + } elseif ( isset( $field_selection[$type] ) ) { |
|
| 1483 | + $field_types[$type] = $field_selection[$type]; |
|
| 1484 | 1484 | } |
| 1485 | 1485 | |
| 1486 | 1486 | $field_types = apply_filters( 'frm_switch_field_types', $field_types, compact( 'type', 'field_selection' ) ); |
@@ -1525,7 +1525,7 @@ discard block |
||
| 1525 | 1525 | foreach ( $inputs as $input ) { |
| 1526 | 1526 | // This may not be set if a field type was removed using the frm_available_fields or frm_pro_available_fields filters. |
| 1527 | 1527 | if ( array_key_exists( $input, $fields ) ) { |
| 1528 | - $field_types[ $input ] = $fields[ $input ]; |
|
| 1528 | + $field_types[$input] = $fields[$input]; |
|
| 1529 | 1529 | } |
| 1530 | 1530 | unset( $input ); |
| 1531 | 1531 | } |
@@ -1560,7 +1560,7 @@ discard block |
||
| 1560 | 1560 | 'parent' => false, |
| 1561 | 1561 | 'pointer' => false, |
| 1562 | 1562 | ); |
| 1563 | - $args = wp_parse_args( $args, $defaults ); |
|
| 1563 | + $args = wp_parse_args( $args, $defaults ); |
|
| 1564 | 1564 | |
| 1565 | 1565 | $opt_key = $args['opt_key']; |
| 1566 | 1566 | $field = $args['field']; |
@@ -1576,25 +1576,25 @@ discard block |
||
| 1576 | 1576 | |
| 1577 | 1577 | // Check posted vals before checking saved values |
| 1578 | 1578 | // For fields inside repeating sections - note, don't check if $pointer is true because it will often be zero |
| 1579 | - if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1579 | + if ( $parent && isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1580 | 1580 | if ( FrmField::is_field_with_multiple_values( $field ) ) { |
| 1581 | 1581 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 1582 | - $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 ] ) ) : ''; |
|
| 1582 | + $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] ) ) : ''; |
|
| 1583 | 1583 | } else { |
| 1584 | - $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1584 | + $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1585 | 1585 | } |
| 1586 | 1586 | |
| 1587 | 1587 | return $other_val; |
| 1588 | 1588 | } |
| 1589 | 1589 | |
| 1590 | - if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1590 | + if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1591 | 1591 | // For normal fields |
| 1592 | 1592 | |
| 1593 | 1593 | if ( FrmField::is_field_with_multiple_values( $field ) ) { |
| 1594 | 1594 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 1595 | - $other_val = isset( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ) : ''; |
|
| 1595 | + $other_val = isset( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ) : ''; |
|
| 1596 | 1596 | } else { |
| 1597 | - $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1597 | + $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1598 | 1598 | } |
| 1599 | 1599 | |
| 1600 | 1600 | return $other_val; |
@@ -1604,8 +1604,8 @@ discard block |
||
| 1604 | 1604 | if ( $field['type'] === 'checkbox' && is_array( $field['value'] ) ) { |
| 1605 | 1605 | // Check if there is an "other" val in saved value and make sure the |
| 1606 | 1606 | // "other" val is not equal to the Other checkbox option |
| 1607 | - if ( isset( $field['value'][ $opt_key ] ) && $field['options'][ $opt_key ] != $field['value'][ $opt_key ] ) { |
|
| 1608 | - $other_val = $field['value'][ $opt_key ]; |
|
| 1607 | + if ( isset( $field['value'][$opt_key] ) && $field['options'][$opt_key] != $field['value'][$opt_key] ) { |
|
| 1608 | + $other_val = $field['value'][$opt_key]; |
|
| 1609 | 1609 | } |
| 1610 | 1610 | } else { |
| 1611 | 1611 | /** |
@@ -1619,8 +1619,8 @@ discard block |
||
| 1619 | 1619 | if ( is_array( $field['value'] ) ) { |
| 1620 | 1620 | $o_key = array_search( $temp_val, $field['value'] ); |
| 1621 | 1621 | |
| 1622 | - if ( isset( $field['value'][ $o_key ] ) ) { |
|
| 1623 | - unset( $field['value'][ $o_key ], $o_key ); |
|
| 1622 | + if ( isset( $field['value'][$o_key] ) ) { |
|
| 1623 | + unset( $field['value'][$o_key], $o_key ); |
|
| 1624 | 1624 | } |
| 1625 | 1625 | } elseif ( $temp_val == $field['value'] ) { |
| 1626 | 1626 | // For radio and regular dropdowns |
@@ -1850,11 +1850,11 @@ discard block |
||
| 1850 | 1850 | foreach ( $val as $k => $v ) { |
| 1851 | 1851 | if ( is_string( $v ) ) { |
| 1852 | 1852 | if ( 'custom_html' === $k ) { |
| 1853 | - $val[ $k ] = self::switch_ids_except_strings( $replace, $replace_with, array( '[if description]', '[description]', '[/if description]' ), $v ); |
|
| 1853 | + $val[$k] = self::switch_ids_except_strings( $replace, $replace_with, array( '[if description]', '[description]', '[/if description]' ), $v ); |
|
| 1854 | 1854 | unset( $k, $v ); |
| 1855 | 1855 | continue; |
| 1856 | 1856 | } |
| 1857 | - $val[ $k ] = str_replace( $replace, $replace_with, $v ); |
|
| 1857 | + $val[$k] = str_replace( $replace, $replace_with, $v ); |
|
| 1858 | 1858 | unset( $k, $v ); |
| 1859 | 1859 | } |
| 1860 | 1860 | } |
@@ -1884,8 +1884,8 @@ discard block |
||
| 1884 | 1884 | if ( false === $index ) { |
| 1885 | 1885 | continue; |
| 1886 | 1886 | } |
| 1887 | - unset( $replace[ $index ] ); |
|
| 1888 | - unset( $replace_with[ $index ] ); |
|
| 1887 | + unset( $replace[$index] ); |
|
| 1888 | + unset( $replace_with[$index] ); |
|
| 1889 | 1889 | } |
| 1890 | 1890 | |
| 1891 | 1891 | $value = str_replace( $replace, $replace_with, $value ); |
@@ -2245,7 +2245,7 @@ discard block |
||
| 2245 | 2245 | $countries['class'] = 'frm-countries-opts'; |
| 2246 | 2246 | } |
| 2247 | 2247 | |
| 2248 | - $prepop[ __( 'Countries', 'formidable' ) ] = $countries; |
|
| 2248 | + $prepop[__( 'Countries', 'formidable' )] = $countries; |
|
| 2249 | 2249 | |
| 2250 | 2250 | // State abv. |
| 2251 | 2251 | $states = self::get_us_states(); |
@@ -2256,7 +2256,7 @@ discard block |
||
| 2256 | 2256 | $state_abv['class'] = 'frm-state-abv-opts'; |
| 2257 | 2257 | } |
| 2258 | 2258 | |
| 2259 | - $prepop[ __( 'U.S. State Abbreviations', 'formidable' ) ] = $state_abv; |
|
| 2259 | + $prepop[__( 'U.S. State Abbreviations', 'formidable' )] = $state_abv; |
|
| 2260 | 2260 | |
| 2261 | 2261 | // States. |
| 2262 | 2262 | $states = array_values( $states ); |
@@ -2266,7 +2266,7 @@ discard block |
||
| 2266 | 2266 | $states['class'] = 'frm-states-opts'; |
| 2267 | 2267 | } |
| 2268 | 2268 | |
| 2269 | - $prepop[ __( 'U.S. States', 'formidable' ) ] = $states; |
|
| 2269 | + $prepop[__( 'U.S. States', 'formidable' )] = $states; |
|
| 2270 | 2270 | unset( $state_abv, $states ); |
| 2271 | 2271 | |
| 2272 | 2272 | // Age. |
@@ -2285,7 +2285,7 @@ discard block |
||
| 2285 | 2285 | $ages['class'] = 'frm-age-opts'; |
| 2286 | 2286 | } |
| 2287 | 2287 | |
| 2288 | - $prepop[ __( 'Age', 'formidable' ) ] = $ages; |
|
| 2288 | + $prepop[__( 'Age', 'formidable' )] = $ages; |
|
| 2289 | 2289 | |
| 2290 | 2290 | // Satisfaction. |
| 2291 | 2291 | $satisfaction = array( |
@@ -2301,7 +2301,7 @@ discard block |
||
| 2301 | 2301 | $satisfaction['class'] = 'frm-satisfaction-opts'; |
| 2302 | 2302 | } |
| 2303 | 2303 | |
| 2304 | - $prepop[ __( 'Satisfaction', 'formidable' ) ] = $satisfaction; |
|
| 2304 | + $prepop[__( 'Satisfaction', 'formidable' )] = $satisfaction; |
|
| 2305 | 2305 | |
| 2306 | 2306 | // Importance. |
| 2307 | 2307 | $importance = array( |
@@ -2317,7 +2317,7 @@ discard block |
||
| 2317 | 2317 | $importance['class'] = 'frm-importance-opts'; |
| 2318 | 2318 | } |
| 2319 | 2319 | |
| 2320 | - $prepop[ __( 'Importance', 'formidable' ) ] = $importance; |
|
| 2320 | + $prepop[__( 'Importance', 'formidable' )] = $importance; |
|
| 2321 | 2321 | |
| 2322 | 2322 | // Agreement. |
| 2323 | 2323 | $agreement = array( |
@@ -2333,7 +2333,7 @@ discard block |
||
| 2333 | 2333 | $agreement['class'] = 'frm-agreement-opts'; |
| 2334 | 2334 | } |
| 2335 | 2335 | |
| 2336 | - $prepop[ __( 'Agreement', 'formidable' ) ] = $agreement; |
|
| 2336 | + $prepop[__( 'Agreement', 'formidable' )] = $agreement; |
|
| 2337 | 2337 | |
| 2338 | 2338 | // Likely. |
| 2339 | 2339 | $likely = array( |
@@ -2349,7 +2349,7 @@ discard block |
||
| 2349 | 2349 | $likely['class'] = 'frm-likely-opts'; |
| 2350 | 2350 | } |
| 2351 | 2351 | |
| 2352 | - $prepop[ __( 'Likely', 'formidable' ) ] = $likely; |
|
| 2352 | + $prepop[__( 'Likely', 'formidable' )] = $likely; |
|
| 2353 | 2353 | |
| 2354 | 2354 | $prepop = apply_filters( 'frm_bulk_field_choices', $prepop ); |
| 2355 | 2355 | } |
@@ -2599,17 +2599,17 @@ discard block |
||
| 2599 | 2599 | */ |
| 2600 | 2600 | private static function fill_image_setting_options( $options, &$args ) { |
| 2601 | 2601 | foreach ( $options as $key => $option ) { |
| 2602 | - $args['options'][ $key ] = $option; |
|
| 2602 | + $args['options'][$key] = $option; |
|
| 2603 | 2603 | |
| 2604 | 2604 | if ( ! empty( $option['addon'] ) ) { |
| 2605 | - $args['options'][ $key ]['custom_attrs'] = self::fill_image_setting_addon_link( $option ); |
|
| 2605 | + $args['options'][$key]['custom_attrs'] = self::fill_image_setting_addon_link( $option ); |
|
| 2606 | 2606 | } |
| 2607 | 2607 | |
| 2608 | - unset( $args['options'][ $key ]['addon'] ); |
|
| 2608 | + unset( $args['options'][$key]['addon'] ); |
|
| 2609 | 2609 | $fill = array( 'upgrade', 'message', 'content' ); |
| 2610 | 2610 | |
| 2611 | 2611 | foreach ( $fill as $f ) { |
| 2612 | - unset( $args['options'][ $key ][ $f ], $f ); |
|
| 2612 | + unset( $args['options'][$key][$f], $f ); |
|
| 2613 | 2613 | } |
| 2614 | 2614 | } |
| 2615 | 2615 | } |
@@ -2633,8 +2633,8 @@ discard block |
||
| 2633 | 2633 | $fill = array( 'upgrade', 'message', 'content' ); |
| 2634 | 2634 | |
| 2635 | 2635 | foreach ( $fill as $f ) { |
| 2636 | - if ( isset( $option[ $f ] ) ) { |
|
| 2637 | - $custom_attrs[ 'data-' . $f ] = $option[ $f ]; |
|
| 2636 | + if ( isset( $option[$f] ) ) { |
|
| 2637 | + $custom_attrs['data-' . $f] = $option[$f]; |
|
| 2638 | 2638 | } |
| 2639 | 2639 | } |
| 2640 | 2640 | |
@@ -2703,7 +2703,7 @@ discard block |
||
| 2703 | 2703 | |
| 2704 | 2704 | return array_filter( |
| 2705 | 2705 | $rows, |
| 2706 | - function ( $row ) { |
|
| 2706 | + function( $row ) { |
|
| 2707 | 2707 | FrmAppHelper::unserialize_or_decode( $row->field_options ); |
| 2708 | 2708 | return is_array( $row->field_options ) && ! empty( $row->field_options['draft'] ); |
| 2709 | 2709 | } |
@@ -2770,7 +2770,7 @@ discard block |
||
| 2770 | 2770 | unset( $data['plugin-status'] ); |
| 2771 | 2771 | |
| 2772 | 2772 | foreach ( $data as $key => $value ) { |
| 2773 | - $attributes[ 'data-' . $key ] = $value; |
|
| 2773 | + $attributes['data-' . $key] = $value; |
|
| 2774 | 2774 | } |
| 2775 | 2775 | } |
| 2776 | 2776 | |