@@ -53,7 +53,7 @@ |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | foreach ( $field['options'] as $opt_key => $opt ) { |
| 56 | - $choice_limit_reached = $field_choices_limit_reached_statuses[ $opt_key ] ?? false; |
|
| 56 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key] ?? false; |
|
| 57 | 57 | |
| 58 | 58 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 59 | 59 | continue; |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | continue; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - $choice_limit_reached = $field_choices_limit_reached_statuses[ $opt_key ] ?? false; |
|
| 29 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key] ?? false; |
|
| 30 | 30 | |
| 31 | 31 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 32 | 32 | continue; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | continue; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - $choice_limit_reached = $field_choices_limit_reached_statuses[ $opt_key ] ?? false; |
|
| 31 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key] ?? false; |
|
| 32 | 32 | |
| 33 | 33 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 34 | 34 | continue; |
@@ -113,6 +113,6 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | ?></div> |
| 115 | 115 | <?php |
| 116 | - ++$option_index; |
|
| 116 | + ++ $option_index; |
|
| 117 | 117 | }//end foreach |
| 118 | 118 | }//end if |
@@ -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 | } |
@@ -341,12 +341,12 @@ discard block |
||
| 341 | 341 | * @return void |
| 342 | 342 | */ |
| 343 | 343 | private static function get_posted_field_setting( $setting, &$value ) { |
| 344 | - if ( ! isset( $_POST['field_options'][ $setting ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 344 | + if ( ! isset( $_POST['field_options'][$setting] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 345 | 345 | return; |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | if ( strpos( $setting, 'html' ) !== false ) { |
| 349 | - $value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 349 | + $value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 350 | 350 | |
| 351 | 351 | // Conditionally strip script tags if the user sending $_POST data is not allowed to use unfiltered HTML. |
| 352 | 352 | if ( ! FrmAppHelper::allow_unfiltered_html() ) { |
@@ -354,9 +354,9 @@ discard block |
||
| 354 | 354 | } |
| 355 | 355 | } elseif ( strpos( $setting, 'format_' ) === 0 ) { |
| 356 | 356 | // TODO: Remove stripslashes on output, and use on input only. |
| 357 | - $value = sanitize_text_field( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing |
|
| 357 | + $value = sanitize_text_field( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.NonceVerification.Missing |
|
| 358 | 358 | } else { |
| 359 | - $value = wp_unslash( $_POST['field_options'][ $setting ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 359 | + $value = wp_unslash( $_POST['field_options'][$setting] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 360 | 360 | FrmAppHelper::sanitize_value( 'wp_kses_post', $value ); |
| 361 | 361 | } |
| 362 | 362 | } |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | $values['default_value'] = FrmAppHelper::maybe_json_encode( $field->default_value ); |
| 440 | 440 | |
| 441 | 441 | foreach ( array( 'name', 'description', 'type', 'field_order', 'field_options', 'required' ) as $col ) { |
| 442 | - $values[ $col ] = $field->{$col}; |
|
| 442 | + $values[$col] = $field->{$col}; |
|
| 443 | 443 | } |
| 444 | 444 | } |
| 445 | 445 | |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | $defaults = apply_filters( 'frm_default_field_validation_messages', $defaults, $field ); |
| 486 | 486 | |
| 487 | 487 | $msg = FrmField::get_option( $field, $error ); |
| 488 | - $msg = empty( $msg ) ? $defaults[ $error ]['part'] : $msg; |
|
| 488 | + $msg = empty( $msg ) ? $defaults[$error]['part'] : $msg; |
|
| 489 | 489 | $msg = do_shortcode( $msg ); |
| 490 | 490 | |
| 491 | 491 | return self::maybe_replace_substrings_with_field_name( $msg, $error, $field ); |
@@ -812,7 +812,7 @@ discard block |
||
| 812 | 812 | 'inside_class' => 'inside', |
| 813 | 813 | 'dismiss-icon' => true, |
| 814 | 814 | ); |
| 815 | - $args = array_merge( $defaults, $args ); |
|
| 815 | + $args = array_merge( $defaults, $args ); |
|
| 816 | 816 | |
| 817 | 817 | include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/inline-modal.php'; |
| 818 | 818 | } |
@@ -1096,7 +1096,7 @@ discard block |
||
| 1096 | 1096 | continue; |
| 1097 | 1097 | } |
| 1098 | 1098 | |
| 1099 | - $atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][ $short_key ] ); |
|
| 1099 | + $atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[3][$short_key] ); |
|
| 1100 | 1100 | $tag = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key ); |
| 1101 | 1101 | |
| 1102 | 1102 | $atts['entry'] = $entry; |
@@ -1106,7 +1106,7 @@ discard block |
||
| 1106 | 1106 | if ( $replace_with !== null ) { |
| 1107 | 1107 | $replace_with = self::trigger_shortcode_atts( $replace_with, $atts ); |
| 1108 | 1108 | self::sanitize_embedded_shortcodes( compact( 'entry' ), $replace_with ); |
| 1109 | - $content = str_replace( $shortcodes[0][ $short_key ], $replace_with, $content ); |
|
| 1109 | + $content = str_replace( $shortcodes[0][$short_key], $replace_with, $content ); |
|
| 1110 | 1110 | } |
| 1111 | 1111 | |
| 1112 | 1112 | unset( $atts, $replace_with ); |
@@ -1126,7 +1126,7 @@ discard block |
||
| 1126 | 1126 | $included_atts = array_intersect( $supported_atts, array_keys( $atts ) ); |
| 1127 | 1127 | |
| 1128 | 1128 | foreach ( $included_atts as $included_att ) { |
| 1129 | - if ( '0' === $atts[ $included_att ] ) { |
|
| 1129 | + if ( '0' === $atts[$included_att] ) { |
|
| 1130 | 1130 | // Skip any option that uses 0 so sanitize_url=0 does not encode. |
| 1131 | 1131 | continue; |
| 1132 | 1132 | } |
@@ -1209,8 +1209,8 @@ discard block |
||
| 1209 | 1209 | |
| 1210 | 1210 | $dynamic_default = array( 'admin_email', 'siteurl', 'frmurl', 'sitename', 'get', 'default-email', 'default-from-email' ); |
| 1211 | 1211 | |
| 1212 | - if ( isset( $shortcode_values[ $atts['tag'] ] ) ) { |
|
| 1213 | - $replace_with = $shortcode_values[ $atts['tag'] ]; |
|
| 1212 | + if ( isset( $shortcode_values[$atts['tag']] ) ) { |
|
| 1213 | + $replace_with = $shortcode_values[$atts['tag']]; |
|
| 1214 | 1214 | } elseif ( in_array( $atts['tag'], $dynamic_default, true ) ) { |
| 1215 | 1215 | $replace_with = self::dynamic_default_values( $atts['tag'], $atts ); |
| 1216 | 1216 | } elseif ( $clean_tag === 'user_agent' ) { |
@@ -1459,8 +1459,8 @@ discard block |
||
| 1459 | 1459 | self::field_types_for_input( $single_input, $field_selection, $field_types ); |
| 1460 | 1460 | } elseif ( in_array( $type, $multiple_input, true ) ) { |
| 1461 | 1461 | self::field_types_for_input( $multiple_input, $field_selection, $field_types ); |
| 1462 | - } elseif ( isset( $field_selection[ $type ] ) ) { |
|
| 1463 | - $field_types[ $type ] = $field_selection[ $type ]; |
|
| 1462 | + } elseif ( isset( $field_selection[$type] ) ) { |
|
| 1463 | + $field_types[$type] = $field_selection[$type]; |
|
| 1464 | 1464 | } |
| 1465 | 1465 | |
| 1466 | 1466 | return apply_filters( 'frm_switch_field_types', $field_types, compact( 'type', 'field_selection' ) ); |
@@ -1503,7 +1503,7 @@ discard block |
||
| 1503 | 1503 | foreach ( $inputs as $input ) { |
| 1504 | 1504 | // This may not be set if a field type was removed using the frm_available_fields or frm_pro_available_fields filters. |
| 1505 | 1505 | if ( array_key_exists( $input, $fields ) ) { |
| 1506 | - $field_types[ $input ] = $fields[ $input ]; |
|
| 1506 | + $field_types[$input] = $fields[$input]; |
|
| 1507 | 1507 | } |
| 1508 | 1508 | unset( $input ); |
| 1509 | 1509 | } |
@@ -1538,7 +1538,7 @@ discard block |
||
| 1538 | 1538 | 'parent' => false, |
| 1539 | 1539 | 'pointer' => false, |
| 1540 | 1540 | ); |
| 1541 | - $args = wp_parse_args( $args, $defaults ); |
|
| 1541 | + $args = wp_parse_args( $args, $defaults ); |
|
| 1542 | 1542 | |
| 1543 | 1543 | $opt_key = $args['opt_key']; |
| 1544 | 1544 | $field = $args['field']; |
@@ -1554,25 +1554,25 @@ discard block |
||
| 1554 | 1554 | |
| 1555 | 1555 | // Check posted vals before checking saved values |
| 1556 | 1556 | // For fields inside repeating sections - note, don't check if $pointer is true because it will often be zero |
| 1557 | - if ( $parent && isset( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1557 | + if ( $parent && isset( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1558 | 1558 | if ( FrmField::is_field_with_multiple_values( $field ) ) { |
| 1559 | 1559 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 1560 | - $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 ] ) ) : ''; |
|
| 1560 | + $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] ) ) : ''; |
|
| 1561 | 1561 | } else { |
| 1562 | - $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][ $parent ][ $pointer ]['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1562 | + $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta'][$parent][$pointer]['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1563 | 1563 | } |
| 1564 | 1564 | |
| 1565 | 1565 | return $other_val; |
| 1566 | 1566 | } |
| 1567 | 1567 | |
| 1568 | - if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][ $field['id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1568 | + if ( isset( $field['id'] ) && isset( $_POST['item_meta']['other'][$field['id']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1569 | 1569 | // For normal fields |
| 1570 | 1570 | |
| 1571 | 1571 | if ( FrmField::is_field_with_multiple_values( $field ) ) { |
| 1572 | 1572 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 1573 | - $other_val = isset( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ][ $opt_key ] ) ) : ''; |
|
| 1573 | + $other_val = isset( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ? sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']][$opt_key] ) ) : ''; |
|
| 1574 | 1574 | } else { |
| 1575 | - $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][ $field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1575 | + $other_val = sanitize_text_field( wp_unslash( $_POST['item_meta']['other'][$field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1576 | 1576 | } |
| 1577 | 1577 | |
| 1578 | 1578 | return $other_val; |
@@ -1582,8 +1582,8 @@ discard block |
||
| 1582 | 1582 | if ( $field['type'] === 'checkbox' && is_array( $field['value'] ) ) { |
| 1583 | 1583 | // Check if there is an "other" val in saved value and make sure the |
| 1584 | 1584 | // "other" val is not equal to the Other checkbox option |
| 1585 | - if ( isset( $field['value'][ $opt_key ] ) && $field['options'][ $opt_key ] != $field['value'][ $opt_key ] ) { |
|
| 1586 | - $other_val = $field['value'][ $opt_key ]; |
|
| 1585 | + if ( isset( $field['value'][$opt_key] ) && $field['options'][$opt_key] != $field['value'][$opt_key] ) { |
|
| 1586 | + $other_val = $field['value'][$opt_key]; |
|
| 1587 | 1587 | } |
| 1588 | 1588 | } else { |
| 1589 | 1589 | /** |
@@ -1597,8 +1597,8 @@ discard block |
||
| 1597 | 1597 | if ( is_array( $field['value'] ) ) { |
| 1598 | 1598 | $o_key = array_search( $temp_val, $field['value'] ); |
| 1599 | 1599 | |
| 1600 | - if ( isset( $field['value'][ $o_key ] ) ) { |
|
| 1601 | - unset( $field['value'][ $o_key ], $o_key ); |
|
| 1600 | + if ( isset( $field['value'][$o_key] ) ) { |
|
| 1601 | + unset( $field['value'][$o_key], $o_key ); |
|
| 1602 | 1602 | } |
| 1603 | 1603 | } elseif ( $temp_val == $field['value'] ) { |
| 1604 | 1604 | // For radio and regular dropdowns |
@@ -1826,11 +1826,11 @@ discard block |
||
| 1826 | 1826 | foreach ( $val as $k => $v ) { |
| 1827 | 1827 | if ( is_string( $v ) ) { |
| 1828 | 1828 | if ( 'custom_html' === $k ) { |
| 1829 | - $val[ $k ] = self::switch_ids_except_strings( $replace, $replace_with, array( '[if description]', '[description]', '[/if description]' ), $v ); |
|
| 1829 | + $val[$k] = self::switch_ids_except_strings( $replace, $replace_with, array( '[if description]', '[description]', '[/if description]' ), $v ); |
|
| 1830 | 1830 | unset( $k, $v ); |
| 1831 | 1831 | continue; |
| 1832 | 1832 | } |
| 1833 | - $val[ $k ] = str_replace( $replace, $replace_with, $v ); |
|
| 1833 | + $val[$k] = str_replace( $replace, $replace_with, $v ); |
|
| 1834 | 1834 | unset( $k, $v ); |
| 1835 | 1835 | } |
| 1836 | 1836 | } |
@@ -1860,8 +1860,8 @@ discard block |
||
| 1860 | 1860 | if ( false === $index ) { |
| 1861 | 1861 | continue; |
| 1862 | 1862 | } |
| 1863 | - unset( $replace[ $index ] ); |
|
| 1864 | - unset( $replace_with[ $index ] ); |
|
| 1863 | + unset( $replace[$index] ); |
|
| 1864 | + unset( $replace_with[$index] ); |
|
| 1865 | 1865 | } |
| 1866 | 1866 | return str_replace( $replace, $replace_with, $value ); |
| 1867 | 1867 | } |
@@ -2219,7 +2219,7 @@ discard block |
||
| 2219 | 2219 | $countries['class'] = 'frm-countries-opts'; |
| 2220 | 2220 | } |
| 2221 | 2221 | |
| 2222 | - $prepop[ __( 'Countries', 'formidable' ) ] = $countries; |
|
| 2222 | + $prepop[__( 'Countries', 'formidable' )] = $countries; |
|
| 2223 | 2223 | |
| 2224 | 2224 | // State abv. |
| 2225 | 2225 | $states = self::get_us_states(); |
@@ -2230,7 +2230,7 @@ discard block |
||
| 2230 | 2230 | $state_abv['class'] = 'frm-state-abv-opts'; |
| 2231 | 2231 | } |
| 2232 | 2232 | |
| 2233 | - $prepop[ __( 'U.S. State Abbreviations', 'formidable' ) ] = $state_abv; |
|
| 2233 | + $prepop[__( 'U.S. State Abbreviations', 'formidable' )] = $state_abv; |
|
| 2234 | 2234 | |
| 2235 | 2235 | // States. |
| 2236 | 2236 | $states = array_values( $states ); |
@@ -2240,7 +2240,7 @@ discard block |
||
| 2240 | 2240 | $states['class'] = 'frm-states-opts'; |
| 2241 | 2241 | } |
| 2242 | 2242 | |
| 2243 | - $prepop[ __( 'U.S. States', 'formidable' ) ] = $states; |
|
| 2243 | + $prepop[__( 'U.S. States', 'formidable' )] = $states; |
|
| 2244 | 2244 | unset( $state_abv, $states ); |
| 2245 | 2245 | |
| 2246 | 2246 | // Age. |
@@ -2259,7 +2259,7 @@ discard block |
||
| 2259 | 2259 | $ages['class'] = 'frm-age-opts'; |
| 2260 | 2260 | } |
| 2261 | 2261 | |
| 2262 | - $prepop[ __( 'Age', 'formidable' ) ] = $ages; |
|
| 2262 | + $prepop[__( 'Age', 'formidable' )] = $ages; |
|
| 2263 | 2263 | |
| 2264 | 2264 | // Satisfaction. |
| 2265 | 2265 | $satisfaction = array( |
@@ -2275,7 +2275,7 @@ discard block |
||
| 2275 | 2275 | $satisfaction['class'] = 'frm-satisfaction-opts'; |
| 2276 | 2276 | } |
| 2277 | 2277 | |
| 2278 | - $prepop[ __( 'Satisfaction', 'formidable' ) ] = $satisfaction; |
|
| 2278 | + $prepop[__( 'Satisfaction', 'formidable' )] = $satisfaction; |
|
| 2279 | 2279 | |
| 2280 | 2280 | // Importance. |
| 2281 | 2281 | $importance = array( |
@@ -2291,7 +2291,7 @@ discard block |
||
| 2291 | 2291 | $importance['class'] = 'frm-importance-opts'; |
| 2292 | 2292 | } |
| 2293 | 2293 | |
| 2294 | - $prepop[ __( 'Importance', 'formidable' ) ] = $importance; |
|
| 2294 | + $prepop[__( 'Importance', 'formidable' )] = $importance; |
|
| 2295 | 2295 | |
| 2296 | 2296 | // Agreement. |
| 2297 | 2297 | $agreement = array( |
@@ -2307,7 +2307,7 @@ discard block |
||
| 2307 | 2307 | $agreement['class'] = 'frm-agreement-opts'; |
| 2308 | 2308 | } |
| 2309 | 2309 | |
| 2310 | - $prepop[ __( 'Agreement', 'formidable' ) ] = $agreement; |
|
| 2310 | + $prepop[__( 'Agreement', 'formidable' )] = $agreement; |
|
| 2311 | 2311 | |
| 2312 | 2312 | // Likely. |
| 2313 | 2313 | $likely = array( |
@@ -2323,7 +2323,7 @@ discard block |
||
| 2323 | 2323 | $likely['class'] = 'frm-likely-opts'; |
| 2324 | 2324 | } |
| 2325 | 2325 | |
| 2326 | - $prepop[ __( 'Likely', 'formidable' ) ] = $likely; |
|
| 2326 | + $prepop[__( 'Likely', 'formidable' )] = $likely; |
|
| 2327 | 2327 | |
| 2328 | 2328 | $prepop = apply_filters( 'frm_bulk_field_choices', $prepop ); |
| 2329 | 2329 | } |
@@ -2573,17 +2573,17 @@ discard block |
||
| 2573 | 2573 | */ |
| 2574 | 2574 | private static function fill_image_setting_options( $options, &$args ) { |
| 2575 | 2575 | foreach ( $options as $key => $option ) { |
| 2576 | - $args['options'][ $key ] = $option; |
|
| 2576 | + $args['options'][$key] = $option; |
|
| 2577 | 2577 | |
| 2578 | 2578 | if ( ! empty( $option['addon'] ) ) { |
| 2579 | - $args['options'][ $key ]['custom_attrs'] = self::fill_image_setting_addon_link( $option ); |
|
| 2579 | + $args['options'][$key]['custom_attrs'] = self::fill_image_setting_addon_link( $option ); |
|
| 2580 | 2580 | } |
| 2581 | 2581 | |
| 2582 | - unset( $args['options'][ $key ]['addon'] ); |
|
| 2582 | + unset( $args['options'][$key]['addon'] ); |
|
| 2583 | 2583 | $fill = array( 'upgrade', 'message', 'content' ); |
| 2584 | 2584 | |
| 2585 | 2585 | foreach ( $fill as $f ) { |
| 2586 | - unset( $args['options'][ $key ][ $f ], $f ); |
|
| 2586 | + unset( $args['options'][$key][$f], $f ); |
|
| 2587 | 2587 | } |
| 2588 | 2588 | } |
| 2589 | 2589 | } |
@@ -2607,8 +2607,8 @@ discard block |
||
| 2607 | 2607 | $fill = array( 'upgrade', 'message', 'content' ); |
| 2608 | 2608 | |
| 2609 | 2609 | foreach ( $fill as $f ) { |
| 2610 | - if ( isset( $option[ $f ] ) ) { |
|
| 2611 | - $custom_attrs[ 'data-' . $f ] = $option[ $f ]; |
|
| 2610 | + if ( isset( $option[$f] ) ) { |
|
| 2611 | + $custom_attrs['data-' . $f] = $option[$f]; |
|
| 2612 | 2612 | } |
| 2613 | 2613 | } |
| 2614 | 2614 | |
@@ -2673,7 +2673,7 @@ discard block |
||
| 2673 | 2673 | |
| 2674 | 2674 | return array_filter( |
| 2675 | 2675 | $rows, |
| 2676 | - function ( $row ) { |
|
| 2676 | + function( $row ) { |
|
| 2677 | 2677 | FrmAppHelper::unserialize_or_decode( $row->field_options ); |
| 2678 | 2678 | return is_array( $row->field_options ) && ! empty( $row->field_options['draft'] ); |
| 2679 | 2679 | } |
@@ -2743,7 +2743,7 @@ discard block |
||
| 2743 | 2743 | unset( $data['plugin-status'] ); |
| 2744 | 2744 | |
| 2745 | 2745 | foreach ( $data as $key => $value ) { |
| 2746 | - $attributes[ 'data-' . $key ] = $value; |
|
| 2746 | + $attributes['data-' . $key] = $value; |
|
| 2747 | 2747 | } |
| 2748 | 2748 | } |
| 2749 | 2749 | |