@@ -34,7 +34,7 @@ |
||
| 34 | 34 | $max_length = intval( FrmField::get_option( $this->field, 'max' ) ); |
| 35 | 35 | |
| 36 | 36 | if ( $max_length && strlen( $args['value'] ) > $max_length ) { |
| 37 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 37 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | return $errors; |
@@ -173,12 +173,12 @@ discard block |
||
| 173 | 173 | * @return array |
| 174 | 174 | */ |
| 175 | 175 | private function prepare_array_property( $index, $atts ) { |
| 176 | - if ( isset( $atts[ $index ] ) && ! empty( $atts[ $index ] ) ) { |
|
| 176 | + if ( isset( $atts[$index] ) && ! empty( $atts[$index] ) ) { |
|
| 177 | 177 | |
| 178 | - if ( is_array( $atts[ $index ] ) ) { |
|
| 179 | - $property = $atts[ $index ]; |
|
| 178 | + if ( is_array( $atts[$index] ) ) { |
|
| 179 | + $property = $atts[$index]; |
|
| 180 | 180 | } else { |
| 181 | - $property = explode( ',', $atts[ $index ] ); |
|
| 181 | + $property = explode( ',', $atts[$index] ); |
|
| 182 | 182 | } |
| 183 | 183 | } else { |
| 184 | 184 | $property = array(); |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | ); |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | - $ip = array( |
|
| 255 | + $ip = array( |
|
| 256 | 256 | 'label' => __( 'IP Address', 'formidable' ), |
| 257 | 257 | 'value' => $this->entry->ip, |
| 258 | 258 | ); |
@@ -330,6 +330,6 @@ discard block |
||
| 330 | 330 | * @param stdClass $field |
| 331 | 331 | */ |
| 332 | 332 | protected function add_field_values( $field ) { |
| 333 | - $this->field_values[ $field->id ] = new FrmFieldValue( $field, $this->entry ); |
|
| 333 | + $this->field_values[$field->id] = new FrmFieldValue( $field, $this->entry ); |
|
| 334 | 334 | } |
| 335 | 335 | } |
@@ -75,20 +75,20 @@ discard block |
||
| 75 | 75 | 'name' => sprintf( |
| 76 | 76 | /* translators: Formidable addon name */ |
| 77 | 77 | esc_html_x( 'Formidable %s', 'Formidable Addon Name', 'formidable' ), |
| 78 | - $addon_list[ $matching_addon ]['name'] |
|
| 78 | + $addon_list[$matching_addon]['name'] |
|
| 79 | 79 | ), |
| 80 | - 'addon' => $addon_list[ $matching_addon ]['slug'], |
|
| 81 | - 'short_description' => $addon_list[ $matching_addon ]['excerpt'], |
|
| 80 | + 'addon' => $addon_list[$matching_addon]['slug'], |
|
| 81 | + 'short_description' => $addon_list[$matching_addon]['excerpt'], |
|
| 82 | 82 | 'slug' => self::$slug, |
| 83 | - 'version' => $addon_list[ $matching_addon ]['version'], |
|
| 83 | + 'version' => $addon_list[$matching_addon]['version'], |
|
| 84 | 84 | ); |
| 85 | 85 | |
| 86 | - if ( ! empty( $addon_list[ $matching_addon ]['external'] ) ) { |
|
| 86 | + if ( ! empty( $addon_list[$matching_addon]['external'] ) ) { |
|
| 87 | 87 | unset( $overrides['name'] ); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | // Splice in the base addon data. |
| 91 | - $inject = array_merge( $inject, $addon_list[ $matching_addon ], $overrides ); |
|
| 91 | + $inject = array_merge( $inject, $addon_list[$matching_addon], $overrides ); |
|
| 92 | 92 | |
| 93 | 93 | // Add it to the top of the list. |
| 94 | 94 | array_unshift( $result->plugins, $inject ); |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | */ |
| 340 | 340 | protected function is_installed( $plugin ) { |
| 341 | 341 | $all_plugins = FrmAppHelper::get_plugins(); |
| 342 | - return isset( $all_plugins[ $plugin ] ); |
|
| 342 | + return isset( $all_plugins[$plugin] ); |
|
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | /** |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } else { |
| 93 | 93 | foreach ( $addons as $k => $addon ) { |
| 94 | 94 | if ( empty( $addon['excerpt'] ) && $k !== 'error' ) { |
| 95 | - unset( $addons[ $k ] ); |
|
| 95 | + unset( $addons[$k] ); |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | foreach ( $list as $k => $info ) { |
| 195 | 195 | $info['slug'] = $k; |
| 196 | - $list[ $k ] = array_merge( $defaults, $info ); |
|
| 196 | + $list[$k] = array_merge( $defaults, $info ); |
|
| 197 | 197 | } |
| 198 | 198 | return $list; |
| 199 | 199 | } |
@@ -338,16 +338,16 @@ discard block |
||
| 338 | 338 | continue; |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | - $wp_plugin = isset( $wp_plugins[ $folder ] ) ? $wp_plugins[ $folder ] : array(); |
|
| 341 | + $wp_plugin = isset( $wp_plugins[$folder] ) ? $wp_plugins[$folder] : array(); |
|
| 342 | 342 | $wp_version = isset( $wp_plugin['Version'] ) ? $wp_plugin['Version'] : '1.0'; |
| 343 | 343 | |
| 344 | 344 | if ( version_compare( $wp_version, $plugin->new_version, '<' ) ) { |
| 345 | 345 | $slug = explode( '/', $folder ); |
| 346 | 346 | $plugin->slug = $slug[0]; |
| 347 | - $transient->response[ $folder ] = $plugin; |
|
| 347 | + $transient->response[$folder] = $plugin; |
|
| 348 | 348 | } |
| 349 | 349 | |
| 350 | - $transient->checked[ $folder ] = $wp_version; |
|
| 350 | + $transient->checked[$folder] = $wp_version; |
|
| 351 | 351 | |
| 352 | 352 | } |
| 353 | 353 | |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | */ |
| 381 | 381 | protected static function is_installed( $plugin ) { |
| 382 | 382 | $all_plugins = self::get_plugins(); |
| 383 | - return isset( $all_plugins[ $plugin ] ); |
|
| 383 | + return isset( $all_plugins[$plugin] ); |
|
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | /** |
@@ -419,13 +419,13 @@ discard block |
||
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | $download_id = isset( $plugin['id'] ) ? $plugin['id'] : 0; |
| 422 | - if ( ! empty( $download_id ) && ! isset( $version_info[ $download_id ]['package'] ) ) { |
|
| 422 | + if ( ! empty( $download_id ) && ! isset( $version_info[$download_id]['package'] ) ) { |
|
| 423 | 423 | // if this addon is using its own license, get the update url |
| 424 | 424 | $addon_info = $api->get_api_info(); |
| 425 | 425 | |
| 426 | - $version_info[ $download_id ] = $addon_info[ $download_id ]; |
|
| 426 | + $version_info[$download_id] = $addon_info[$download_id]; |
|
| 427 | 427 | if ( isset( $addon_info['error'] ) ) { |
| 428 | - $version_info[ $download_id ]['error'] = array( |
|
| 428 | + $version_info[$download_id]['error'] = array( |
|
| 429 | 429 | 'message' => $addon_info['error']['message'], |
| 430 | 430 | 'code' => $addon_info['error']['code'], |
| 431 | 431 | ); |
@@ -524,8 +524,8 @@ discard block |
||
| 524 | 524 | return $addon; |
| 525 | 525 | } |
| 526 | 526 | } |
| 527 | - } elseif ( isset( $addons[ $download_id ] ) ) { |
|
| 528 | - $plugin = $addons[ $download_id ]; |
|
| 527 | + } elseif ( isset( $addons[$download_id] ) ) { |
|
| 528 | + $plugin = $addons[$download_id]; |
|
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | return $plugin; |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | self::prepare_addon_link( $addon['link'] ); |
| 587 | 587 | |
| 588 | 588 | self::set_addon_status( $addon ); |
| 589 | - $addons[ $id ] = $addon; |
|
| 589 | + $addons[$id] = $addon; |
|
| 590 | 590 | } |
| 591 | 591 | } |
| 592 | 592 | |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | 'utm_medium' => 'addons', |
| 623 | 623 | 'utm_campaign' => 'liteplugin', |
| 624 | 624 | ); |
| 625 | - $link = add_query_arg( $query_args, $link ); |
|
| 625 | + $link = add_query_arg( $query_args, $link ); |
|
| 626 | 626 | } |
| 627 | 627 | |
| 628 | 628 | /** |
@@ -201,8 +201,8 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | if ( is_wp_error( $resp ) ) { |
| 203 | 203 | $error_string = $resp->get_error_message(); |
| 204 | - $errors[ 'field' . $args['id'] ] = __( 'There was a problem verifying your captcha', 'formidable' ); |
|
| 205 | - $errors[ 'field' . $args['id'] ] .= ' ' . $error_string; |
|
| 204 | + $errors['field' . $args['id']] = __( 'There was a problem verifying your captcha', 'formidable' ); |
|
| 205 | + $errors['field' . $args['id']] .= ' ' . $error_string; |
|
| 206 | 206 | return $errors; |
| 207 | 207 | } |
| 208 | 208 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | if ( $invalid_message === __( 'The reCAPTCHA was not entered correctly', 'formidable' ) ) { |
| 230 | 230 | $invalid_message = ''; |
| 231 | 231 | } |
| 232 | - $errors[ 'field' . $args['id'] ] = ( $invalid_message === '' ? $frm_settings->re_msg : $invalid_message ); |
|
| 232 | + $errors['field' . $args['id']] = ( $invalid_message === '' ? $frm_settings->re_msg : $invalid_message ); |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | return $errors; |
@@ -245,8 +245,8 @@ discard block |
||
| 245 | 245 | $frm_vars['captcha_scores'] = array(); |
| 246 | 246 | } |
| 247 | 247 | $form_id = is_object( $this->field ) ? $this->field->form_id : $this->field['form_id']; |
| 248 | - if ( ! isset( $frm_vars['captcha_scores'][ $form_id ] ) ) { |
|
| 249 | - $frm_vars['captcha_scores'][ $form_id ] = $score; |
|
| 248 | + if ( ! isset( $frm_vars['captcha_scores'][$form_id] ) ) { |
|
| 249 | + $frm_vars['captcha_scores'][$form_id] = $score; |
|
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | |
@@ -106,8 +106,8 @@ |
||
| 106 | 106 | function load_formidable_pro() { |
| 107 | 107 | } |
| 108 | 108 | /** |
| 109 | - * @return WPMailSMTP\Core |
|
| 110 | - */ |
|
| 109 | + * @return WPMailSMTP\Core |
|
| 110 | + */ |
|
| 111 | 111 | function wp_mail_smtp() { |
| 112 | 112 | } |
| 113 | 113 | /** |
@@ -119,7 +119,8 @@ |
||
| 119 | 119 | * @return void |
| 120 | 120 | */ |
| 121 | 121 | private static function maybe_hook_into_global_settings_save() { |
| 122 | - if ( empty( $_POST ) || ! isset( $_POST['style'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 122 | + if ( empty( $_POST ) || ! isset( $_POST['style'] ) ) { |
|
| 123 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 123 | 124 | // Avoid changing any style data if the style array is not sent in the request. |
| 124 | 125 | return; |
| 125 | 126 | } |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | } |
| 652 | 652 | |
| 653 | 653 | parse_str( $query, $parsed_query ); |
| 654 | - $form_id = ! empty( $parsed_query['form'] ) ? absint( $parsed_query['form'] ) : 0; |
|
| 654 | + $form_id = ! empty( $parsed_query['form'] ) ? absint( $parsed_query['form'] ) : 0; |
|
| 655 | 655 | |
| 656 | 656 | $style = new stdClass(); |
| 657 | 657 | $style->ID = end( $ids ); |
@@ -689,8 +689,8 @@ discard block |
||
| 689 | 689 | |
| 690 | 690 | $forms = FrmForm::get_published_forms(); |
| 691 | 691 | foreach ( $forms as $form ) { |
| 692 | - $new_style = ( isset( $_POST['style'] ) && isset( $_POST['style'][ $form->id ] ) ) ? sanitize_text_field( wp_unslash( $_POST['style'][ $form->id ] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 693 | - $previous_style = ( isset( $_POST['prev_style'] ) && isset( $_POST['prev_style'][ $form->id ] ) ) ? sanitize_text_field( wp_unslash( $_POST['prev_style'][ $form->id ] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 692 | + $new_style = ( isset( $_POST['style'] ) && isset( $_POST['style'][$form->id] ) ) ? sanitize_text_field( wp_unslash( $_POST['style'][$form->id] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 693 | + $previous_style = ( isset( $_POST['prev_style'] ) && isset( $_POST['prev_style'][$form->id] ) ) ? sanitize_text_field( wp_unslash( $_POST['prev_style'][$form->id] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 694 | 694 | if ( $new_style == $previous_style ) { |
| 695 | 695 | continue; |
| 696 | 696 | } |
@@ -1064,8 +1064,8 @@ discard block |
||
| 1064 | 1064 | */ |
| 1065 | 1065 | public static function get_style_val( $val, $form = 'default' ) { |
| 1066 | 1066 | $style = self::get_form_style( $form ); |
| 1067 | - if ( $style && isset( $style->post_content[ $val ] ) ) { |
|
| 1068 | - return $style->post_content[ $val ]; |
|
| 1067 | + if ( $style && isset( $style->post_content[$val] ) ) { |
|
| 1068 | + return $style->post_content[$val]; |
|
| 1069 | 1069 | } |
| 1070 | 1070 | } |
| 1071 | 1071 | |
@@ -1084,7 +1084,7 @@ discard block |
||
| 1084 | 1084 | } elseif ( 'alt_bg_color' == $name ) { |
| 1085 | 1085 | $setting = 'bg_color_active'; |
| 1086 | 1086 | } |
| 1087 | - $default_styles[ $name ] = $style->post_content[ $setting ]; |
|
| 1087 | + $default_styles[$name] = $style->post_content[$setting]; |
|
| 1088 | 1088 | unset( $name, $val ); |
| 1089 | 1089 | } |
| 1090 | 1090 | |
@@ -67,7 +67,8 @@ |
||
| 67 | 67 | $new_instance = (array) $new_instance; |
| 68 | 68 | $this->id = $new_instance['ID']; |
| 69 | 69 | |
| 70 | - if ( $id != $this->id || ! $_POST || ! isset( $_POST['frm_style_setting'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 70 | + if ( $id != $this->id || ! $_POST || ! isset( $_POST['frm_style_setting'] ) ) { |
|
| 71 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 71 | 72 | // Don't continue if not saving this style. |
| 72 | 73 | continue; |
| 73 | 74 | } |
@@ -92,21 +92,21 @@ discard block |
||
| 92 | 92 | $default_settings = $this->get_defaults(); |
| 93 | 93 | |
| 94 | 94 | foreach ( $default_settings as $setting => $default ) { |
| 95 | - if ( ! isset( $new_instance['post_content'][ $setting ] ) ) { |
|
| 96 | - $new_instance['post_content'][ $setting ] = $default; |
|
| 95 | + if ( ! isset( $new_instance['post_content'][$setting] ) ) { |
|
| 96 | + $new_instance['post_content'][$setting] = $default; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | if ( $this->is_color( $setting ) ) { |
| 100 | - $color_val = $new_instance['post_content'][ $setting ]; |
|
| 100 | + $color_val = $new_instance['post_content'][$setting]; |
|
| 101 | 101 | if ( $color_val !== '' && false !== strpos( $color_val, 'rgb' ) ) { |
| 102 | 102 | // Maybe sanitize if invalid rgba value is entered. |
| 103 | 103 | $this->maybe_sanitize_rgba_value( $color_val ); |
| 104 | 104 | } |
| 105 | - $new_instance['post_content'][ $setting ] = str_replace( '#', '', $color_val ); |
|
| 106 | - } elseif ( in_array( $setting, array( 'submit_style', 'important_style', 'auto_width' ), true ) && ! isset( $new_instance['post_content'][ $setting ] ) ) { |
|
| 107 | - $new_instance['post_content'][ $setting ] = 0; |
|
| 105 | + $new_instance['post_content'][$setting] = str_replace( '#', '', $color_val ); |
|
| 106 | + } elseif ( in_array( $setting, array( 'submit_style', 'important_style', 'auto_width' ), true ) && ! isset( $new_instance['post_content'][$setting] ) ) { |
|
| 107 | + $new_instance['post_content'][$setting] = 0; |
|
| 108 | 108 | } elseif ( $setting === 'font' ) { |
| 109 | - $new_instance['post_content'][ $setting ] = $this->force_balanced_quotation( $new_instance['post_content'][ $setting ] ); |
|
| 109 | + $new_instance['post_content'][$setting] = $this->force_balanced_quotation( $new_instance['post_content'][$setting] ); |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
@@ -226,10 +226,10 @@ discard block |
||
| 226 | 226 | $valid_keys = array_keys( $defaults ); |
| 227 | 227 | $sanitized_settings = array(); |
| 228 | 228 | foreach ( $valid_keys as $key ) { |
| 229 | - if ( isset( $settings[ $key ] ) ) { |
|
| 230 | - $sanitized_settings[ $key ] = sanitize_textarea_field( $settings[ $key ] ); |
|
| 229 | + if ( isset( $settings[$key] ) ) { |
|
| 230 | + $sanitized_settings[$key] = sanitize_textarea_field( $settings[$key] ); |
|
| 231 | 231 | } else { |
| 232 | - $sanitized_settings[ $key ] = $defaults[ $key ]; |
|
| 232 | + $sanitized_settings[$key] = $defaults[$key]; |
|
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | 235 | return $sanitized_settings; |
@@ -424,13 +424,13 @@ discard block |
||
| 424 | 424 | $style->post_content = $this->override_defaults( $style->post_content ); |
| 425 | 425 | $style->post_content = wp_parse_args( $style->post_content, $default_values ); |
| 426 | 426 | |
| 427 | - $styles[ $style->ID ] = $style; |
|
| 427 | + $styles[$style->ID] = $style; |
|
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | if ( ! $default_style ) { |
| 431 | 431 | $default_style = reset( $styles ); |
| 432 | 432 | |
| 433 | - $styles[ $default_style->ID ]->menu_order = 1; |
|
| 433 | + $styles[$default_style->ID]->menu_order = 1; |
|
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | return $styles; |
@@ -285,7 +285,8 @@ |
||
| 285 | 285 | public static function get_settings_for_output( $style ) { |
| 286 | 286 | if ( self::previewing_style() ) { |
| 287 | 287 | $frm_style = new FrmStyle(); |
| 288 | - if ( isset( $_POST['frm_style_setting'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 288 | + if ( isset( $_POST['frm_style_setting'] ) ) { |
|
| 289 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 289 | 290 | |
| 290 | 291 | // Sanitizing is done later. |
| 291 | 292 | $posted = wp_unslash( $_POST['frm_style_setting'] ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | '-' => 'down', |
| 136 | 136 | '+' => 'up', |
| 137 | 137 | ); |
| 138 | - $class = 'frm_arrow' . $arrow[ $icon ]; |
|
| 138 | + $class = 'frm_arrow' . $arrow[$icon]; |
|
| 139 | 139 | } else { |
| 140 | 140 | //frm_minus1_icon |
| 141 | 141 | $key = str_replace( 'p', '', $key ); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | '-' => 'minus', |
| 144 | 144 | '+' => 'plus', |
| 145 | 145 | ); |
| 146 | - $class = 'frm_' . $plus[ $icon ]; |
|
| 146 | + $class = 'frm_' . $plus[$icon]; |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | if ( $key ) { |
@@ -169,8 +169,8 @@ discard block |
||
| 169 | 169 | ?> |
| 170 | 170 | <div class="btn-group" id="frm_<?php echo esc_attr( $name ); ?>_select"> |
| 171 | 171 | <button class="multiselect dropdown-toggle btn btn-default" data-toggle="dropdown" type="button"> |
| 172 | - <?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[ $name ], '+', $type ) ); ?> |
|
| 173 | - <?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[ $name ], '-', $type ) ); ?> |
|
| 172 | + <?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[$name], '+', $type ) ); ?> |
|
| 173 | + <?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[$name], '-', $type ) ); ?> |
|
| 174 | 174 | <b class="caret"></b> |
| 175 | 175 | </button> |
| 176 | 176 | <ul class="multiselect-container frm-dropdown-menu"> |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | <li <?php echo ( $style->post_content['collapse_icon'] == $key ) ? 'class="active"' : ''; ?>> |
| 179 | 179 | <a href="javascript:void(0);"> |
| 180 | 180 | <label> |
| 181 | - <input type="radio" value="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $frm_style->get_field_name( $name ) ); ?>" <?php checked( $style->post_content[ $name ], $key ); ?> /> |
|
| 181 | + <input type="radio" value="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $frm_style->get_field_name( $name ) ); ?>" <?php checked( $style->post_content[$name], $key ); ?> /> |
|
| 182 | 182 | <span> |
| 183 | 183 | <?php |
| 184 | 184 | FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $key, '+', $type ) ); |
@@ -271,15 +271,15 @@ discard block |
||
| 271 | 271 | $vars = array_diff( $vars, $remove ); |
| 272 | 272 | |
| 273 | 273 | foreach ( $vars as $var ) { |
| 274 | - if ( ! isset( $settings[ $var ] ) ) { |
|
| 274 | + if ( ! isset( $settings[$var] ) ) { |
|
| 275 | 275 | continue; |
| 276 | 276 | } |
| 277 | - if ( ! isset( $defaults[ $var ] ) ) { |
|
| 278 | - $defaults[ $var ] = ''; |
|
| 277 | + if ( ! isset( $defaults[$var] ) ) { |
|
| 278 | + $defaults[$var] = ''; |
|
| 279 | 279 | } |
| 280 | - $show = empty( $defaults ) || ( $settings[ $var ] !== '' && $settings[ $var ] !== $defaults[ $var ] ); |
|
| 280 | + $show = empty( $defaults ) || ( $settings[$var] !== '' && $settings[$var] !== $defaults[$var] ); |
|
| 281 | 281 | if ( $show ) { |
| 282 | - echo '--' . esc_html( str_replace( '_', '-', $var ) ) . ':' . ( $var === 'font' ? FrmAppHelper::kses( $settings[ $var ] ) : esc_html( $settings[ $var ] ) ) . ';'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
| 282 | + echo '--' . esc_html( str_replace( '_', '-', $var ) ) . ':' . ( $var === 'font' ? FrmAppHelper::kses( $settings[$var] ) : esc_html( $settings[$var] ) ) . ';'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | 285 | } |
@@ -328,8 +328,8 @@ discard block |
||
| 328 | 328 | |
| 329 | 329 | $checkbox_opts = array( 'important_style', 'auto_width', 'submit_style', 'collapse_icon', 'center_form' ); |
| 330 | 330 | foreach ( $checkbox_opts as $opt ) { |
| 331 | - if ( ! isset( $settings[ $opt ] ) ) { |
|
| 332 | - $settings[ $opt ] = 0; |
|
| 331 | + if ( ! isset( $settings[$opt] ) ) { |
|
| 332 | + $settings[$opt] = 0; |
|
| 333 | 333 | } |
| 334 | 334 | } |
| 335 | 335 | |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | $css = ''; |
| 358 | 358 | } |
| 359 | 359 | foreach ( $opts as $opt ) { |
| 360 | - self::get_color_output( $css, $settings[ $opt ] ); |
|
| 360 | + self::get_color_output( $css, $settings[$opt] ); |
|
| 361 | 361 | } |
| 362 | 362 | } |
| 363 | 363 | } |