@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | protected function create_fields( $form_id, &$form ) { |
397 | 397 | foreach ( $form['fields'] as $key => $new_field ) { |
398 | 398 | $new_field['form_id'] = $form_id; |
399 | - $form['fields'][ $key ]['id'] = FrmField::create( $new_field ); |
|
399 | + $form['fields'][$key]['id'] = FrmField::create( $new_field ); |
|
400 | 400 | } |
401 | 401 | } |
402 | 402 | |
@@ -426,9 +426,9 @@ discard block |
||
426 | 426 | } elseif ( $key === 'the_post_title' ) { |
427 | 427 | $new_action->post_content['post_title'] = $value; |
428 | 428 | } elseif ( is_string( $value ) ) { |
429 | - $new_action->post_content[ $key ] = $this->replace_smart_tags( $value, $form['fields'] ); |
|
429 | + $new_action->post_content[$key] = $this->replace_smart_tags( $value, $form['fields'] ); |
|
430 | 430 | } else { |
431 | - $new_action->post_content[ $key ] = $value; |
|
431 | + $new_action->post_content[$key] = $value; |
|
432 | 432 | } |
433 | 433 | } |
434 | 434 | |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | |
448 | 448 | $imported = $this->get_tracked_import(); |
449 | 449 | |
450 | - $imported[ $this->slug ][ $new_form_id ] = $source_id; |
|
450 | + $imported[$this->slug][$new_form_id] = $source_id; |
|
451 | 451 | |
452 | 452 | update_option( $this->tracking, $imported, false ); |
453 | 453 | } |
@@ -467,11 +467,11 @@ discard block |
||
467 | 467 | private function is_imported( $source_id ) { |
468 | 468 | $imported = $this->get_tracked_import(); |
469 | 469 | $new_form_id = 0; |
470 | - if ( ! isset( $imported[ $this->slug ] ) || ! in_array( $source_id, $imported[ $this->slug ] ) ) { |
|
470 | + if ( ! isset( $imported[$this->slug] ) || ! in_array( $source_id, $imported[$this->slug] ) ) { |
|
471 | 471 | return $new_form_id; |
472 | 472 | } |
473 | 473 | |
474 | - $new_form_id = array_search( $source_id, array_reverse( $imported[ $this->slug ], true ) ); |
|
474 | + $new_form_id = array_search( $source_id, array_reverse( $imported[$this->slug], true ) ); |
|
475 | 475 | if ( ! empty( $new_form_id ) && empty( FrmForm::get_key_by_id( $new_form_id ) ) ) { |
476 | 476 | // Allow reimport if the form was deleted. |
477 | 477 | $new_form_id = 0; |
@@ -235,7 +235,7 @@ |
||
235 | 235 | if ( is_array( $upsell ) ) { |
236 | 236 | foreach ( $upsell as $k => $plugin ) { |
237 | 237 | if ( strpos( $plugin['slug'], 'wpforms' ) !== false ) { |
238 | - unset( $upsell[ $k ] ); |
|
238 | + unset( $upsell[$k] ); |
|
239 | 239 | } |
240 | 240 | } |
241 | 241 | } |
@@ -129,11 +129,11 @@ discard block |
||
129 | 129 | <?php } ?> |
130 | 130 | |
131 | 131 | .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before{ |
132 | - content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['-'] : $minus_icons[1]['-'] ); ?>"; |
|
132 | + content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['-'] : $minus_icons[1]['-'] ); ?>"; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_plus_icon:before{ |
136 | - content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['+'] : $minus_icons[1]['+'] ); ?>"; |
|
136 | + content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['+'] : $minus_icons[1]['+'] ); ?>"; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | .<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before, |
@@ -145,14 +145,14 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | .<?php echo esc_html( $style_class ); ?> .frm_trigger.active .frm_icon_font.frm_arrow_icon:before{ |
148 | - content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['-'] : $arrow_icons[1]['-'] ); ?>"; |
|
148 | + content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['-'] : $arrow_icons[1]['-'] ); ?>"; |
|
149 | 149 | <?php if ( ! empty( $section_color ) ) { ?> |
150 | 150 | color:<?php echo esc_html( $section_color . $important ); ?>; |
151 | 151 | <?php } ?> |
152 | 152 | } |
153 | 153 | |
154 | 154 | .<?php echo esc_html( $style_class ); ?> .frm_trigger .frm_icon_font.frm_arrow_icon:before{ |
155 | - content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['+'] : $arrow_icons[1]['+'] ); ?>"; |
|
155 | + content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['+'] : $arrow_icons[1]['+'] ); ?>"; |
|
156 | 156 | <?php if ( ! empty( $section_color ) ) { ?> |
157 | 157 | color:<?php echo esc_html( $section_color . $important ); ?>; |
158 | 158 | <?php } ?> |
@@ -71,12 +71,12 @@ discard block |
||
71 | 71 | $show_intervals = array( 50, 200, 500 ); |
72 | 72 | $asked = $this->review_status['asked']; |
73 | 73 | |
74 | - if ( ! isset( $show_intervals[ $asked ] ) ) { |
|
74 | + if ( ! isset( $show_intervals[$asked] ) ) { |
|
75 | 75 | return; |
76 | 76 | } |
77 | 77 | |
78 | 78 | $entries = FrmEntry::getRecordCount(); |
79 | - $count = $show_intervals[ $asked ]; |
|
79 | + $count = $show_intervals[$asked]; |
|
80 | 80 | $user = wp_get_current_user(); |
81 | 81 | |
82 | 82 | // Only show review request if the site has collected enough entries |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $requests = $message->get_messages(); |
119 | 119 | $key = $this->inbox_key . ( $asked ? $asked : '' ); |
120 | 120 | |
121 | - if ( isset( $requests[ $key ] ) ) { |
|
121 | + if ( isset( $requests[$key] ) ) { |
|
122 | 122 | return; |
123 | 123 | } |
124 | 124 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * @since 4.05.02 |
155 | 155 | */ |
156 | 156 | private function has_later_request( $requests, $asked ) { |
157 | - return isset( $requests[ $this->inbox_key . ( $asked + 1 ) ] ) || isset( $requests[ $this->inbox_key . ( $asked + 2 ) ] ); |
|
157 | + return isset( $requests[$this->inbox_key . ( $asked + 1 )] ) || isset( $requests[$this->inbox_key . ( $asked + 2 )] ); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | |
162 | 162 | $conditionally_add = array( 'include_fields', 'fields', 'exclude_fields', 'entry' ); |
163 | 163 | foreach ( $conditionally_add as $index ) { |
164 | - if ( isset( $atts[ $index ] ) ) { |
|
165 | - $entry_atts[ $index ] = $atts[ $index ]; |
|
164 | + if ( isset( $atts[$index] ) ) { |
|
165 | + $entry_atts[$index] = $atts[$index]; |
|
166 | 166 | } |
167 | 167 | } |
168 | 168 | |
@@ -331,8 +331,8 @@ discard block |
||
331 | 331 | |
332 | 332 | $unset = array( 'id', 'entry', 'form_id', 'format' ); |
333 | 333 | foreach ( $unset as $param ) { |
334 | - if ( isset( $atts[ $param ] ) ) { |
|
335 | - unset( $atts[ $param ] ); |
|
334 | + if ( isset( $atts[$param] ) ) { |
|
335 | + unset( $atts[$param] ); |
|
336 | 336 | } |
337 | 337 | } |
338 | 338 | |
@@ -485,11 +485,11 @@ discard block |
||
485 | 485 | |
486 | 486 | $displayed_value = $this->prepare_display_value_for_array( $field_value->get_displayed_value() ); |
487 | 487 | |
488 | - $output[ $this->get_key_or_id( $field_value ) ] = $displayed_value; |
|
488 | + $output[$this->get_key_or_id( $field_value )] = $displayed_value; |
|
489 | 489 | |
490 | 490 | $has_separate_value = (bool) $field_value->get_field_option( 'separate_value' ); |
491 | 491 | if ( $has_separate_value || $displayed_value !== $field_value->get_saved_value() ) { |
492 | - $output[ $this->get_key_or_id( $field_value ) . '-value' ] = $field_value->get_saved_value(); |
|
492 | + $output[$this->get_key_or_id( $field_value ) . '-value'] = $field_value->get_saved_value(); |
|
493 | 493 | } |
494 | 494 | } |
495 | 495 | } |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | |
877 | 877 | if ( is_array( $value ) ) { |
878 | 878 | foreach ( $value as $key => $single_value ) { |
879 | - $value[ $key ] = $this->strip_html( $single_value ); |
|
879 | + $value[$key] = $this->strip_html( $single_value ); |
|
880 | 880 | } |
881 | 881 | } elseif ( $this->is_plain_text && ! is_array( $value ) ) { |
882 | 882 | if ( strpos( $value, '<img' ) !== false ) { |
@@ -29,7 +29,7 @@ |
||
29 | 29 | </h3> |
30 | 30 | <span class="frm_inbox_date"> |
31 | 31 | <?php |
32 | - if ( ! isset( $message['read'] ) || ! isset( $message['read'][ $user->ID ] ) ) { |
|
32 | + if ( ! isset( $message['read'] ) || ! isset( $message['read'][$user->ID] ) ) { |
|
33 | 33 | $inbox->mark_read( $key ); |
34 | 34 | ?> |
35 | 35 | <span class="frm_inbox_unread"></span> |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function add_settings( $sections ) { |
161 | 161 | wp_enqueue_style( 'formidable-pro-fields' ); |
162 | - $sections[ $this->plugin_slug ] = array( |
|
162 | + $sections[$this->plugin_slug] = array( |
|
163 | 163 | 'class' => $this, |
164 | 164 | 'function' => 'settings_page', |
165 | 165 | 'name' => $this->plugin_name(), |
@@ -316,9 +316,9 @@ discard block |
||
316 | 316 | // Set the current step. |
317 | 317 | if ( ! isset( $step['current'] ) ) { |
318 | 318 | if ( $step['complete'] ) { |
319 | - $steps[ $k ]['current'] = false; |
|
319 | + $steps[$k]['current'] = false; |
|
320 | 320 | } else { |
321 | - $steps[ $k ]['current'] = ! $has_current; |
|
321 | + $steps[$k]['current'] = ! $has_current; |
|
322 | 322 | $has_current = true; |
323 | 323 | } |
324 | 324 | } elseif ( $step['current'] ) { |
@@ -328,10 +328,10 @@ discard block |
||
328 | 328 | // Set disabled buttons. |
329 | 329 | $class = isset( $step['button_class'] ) ? $step['button_class'] : ''; |
330 | 330 | $class .= ' button-primary frm-button-primary'; |
331 | - if ( ! $steps[ $k ]['current'] ) { |
|
331 | + if ( ! $steps[$k]['current'] ) { |
|
332 | 332 | $class .= ' frm_grey disabled'; |
333 | 333 | } |
334 | - $steps[ $k ]['button_class'] = $class; |
|
334 | + $steps[$k]['button_class'] = $class; |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | return $steps; |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | if ( $plugin['status'] === 'active' ) { |
354 | 354 | continue; |
355 | 355 | } |
356 | - $links[ $plugin_key ] = $plugin; |
|
356 | + $links[$plugin_key] = $plugin; |
|
357 | 357 | if ( isset( $plugin['url'] ) ) { |
358 | 358 | $rel[] = $plugin['url']; |
359 | 359 | } else { |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | $addons = $api->get_api_info(); |
469 | 469 | |
470 | 470 | $id = $this->download_id(); |
471 | - $has_file = isset( $addons[ $id ] ) && isset( $addons[ $id ]['beta'] ); |
|
471 | + $has_file = isset( $addons[$id] ) && isset( $addons[$id]['beta'] ); |
|
472 | 472 | |
473 | 473 | if ( ! $step['current'] ) { |
474 | 474 | ?> |
@@ -483,10 +483,10 @@ discard block |
||
483 | 483 | |
484 | 484 | if ( ! $has_file ) { |
485 | 485 | echo '<p class="frm_error_style">' . esc_html__( 'We didn\'t find anything to import. Please contact our team.', 'formidable' ) . '</p>'; |
486 | - } elseif ( ! isset( $addons[ $id ]['beta']['package'] ) ) { |
|
486 | + } elseif ( ! isset( $addons[$id]['beta']['package'] ) ) { |
|
487 | 487 | echo '<p class="frm_error_style">' . esc_html__( 'Looks like you may not have a current subscription for this solution. Please check your account.', 'formidable' ) . '</p>'; |
488 | 488 | } else { |
489 | - $xml = $addons[ $id ]['beta']['package']; |
|
489 | + $xml = $addons[$id]['beta']['package']; |
|
490 | 490 | if ( is_array( $xml ) ) { |
491 | 491 | $xml = reset( $xml ); |
492 | 492 | } |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | foreach ( $forms as $form ) { |
625 | 625 | $was_imported = isset( $form['form'] ) ? FrmForm::get_id_by_key( $form['form'] ) : false; |
626 | 626 | if ( $was_imported ) { |
627 | - $imported[ $form['form'] ] = $was_imported; |
|
627 | + $imported[$form['form']] = $was_imported; |
|
628 | 628 | } |
629 | 629 | } |
630 | 630 |
@@ -42,7 +42,8 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | // Only do this for single site installs. |
45 | - if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
45 | + if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { |
|
46 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
46 | 47 | return; |
47 | 48 | } |
48 | 49 |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | return; |
122 | 122 | } |
123 | 123 | |
124 | - $selected_xml = isset( $form['xml'] ) && isset( $form['xml'][ $selected_form ] ) ? $form['xml'][ $selected_form ] : ''; |
|
124 | + $selected_xml = isset( $form['xml'] ) && isset( $form['xml'][$selected_form] ) ? $form['xml'][$selected_form] : ''; |
|
125 | 125 | if ( empty( $selected_xml ) || strpos( $selected_xml, 'http' ) !== 0 ) { |
126 | 126 | return; |
127 | 127 | } |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | * @since 4.06.02 |
134 | 134 | */ |
135 | 135 | private static function get_selected_in_form( $form, $value = 'form' ) { |
136 | - if ( ! empty( $form ) && isset( $form[ $value ] ) && ! empty( $form[ $value ] ) ) { |
|
137 | - return $form[ $value ]; |
|
136 | + if ( ! empty( $form ) && isset( $form[$value] ) && ! empty( $form[$value] ) ) { |
|
137 | + return $form[$value]; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | return ''; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | } |
164 | 164 | |
165 | 165 | if ( $for === 'view' ) { |
166 | - $item_key = is_array( $view_keys ) ? $view_keys[ $form_key ] : $view_keys; |
|
166 | + $item_key = is_array( $view_keys ) ? $view_keys[$form_key] : $view_keys; |
|
167 | 167 | $shortcode = '[display-frm-data id=%1$s filter=limited]'; |
168 | 168 | } elseif ( $for === 'form' ) { |
169 | 169 | $item_key = $form_key; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | continue; |
179 | 179 | } |
180 | 180 | |
181 | - $page_ids[ $for ] = wp_insert_post( |
|
181 | + $page_ids[$for] = wp_insert_post( |
|
182 | 182 | array( |
183 | 183 | 'post_title' => $name, |
184 | 184 | 'post_type' => 'page', |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash |
320 | 320 | $file_type = sanitize_option( 'upload_path', $_FILES['frm_import_file']['name'] ); |
321 | 321 | $file_type = strtolower( pathinfo( $file_type, PATHINFO_EXTENSION ) ); |
322 | - if ( 'xml' !== $file_type && isset( $export_format[ $file_type ] ) ) { |
|
322 | + if ( 'xml' !== $file_type && isset( $export_format[$file_type] ) ) { |
|
323 | 323 | // allow other file types to be imported |
324 | 324 | do_action( 'frm_before_import_' . $file_type ); |
325 | 325 | |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | foreach ( $type as $tb_type ) { |
403 | 403 | $where = array(); |
404 | 404 | $join = ''; |
405 | - $table = $tables[ $tb_type ]; |
|
405 | + $table = $tables[$tb_type]; |
|
406 | 406 | |
407 | 407 | $select = $table . '.id'; |
408 | 408 | $query_vars = array(); |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | $table . '.parent_form_id' => $args['ids'], |
418 | 418 | ); |
419 | 419 | } else { |
420 | - $where[ $table . '.status !' ] = 'draft'; |
|
420 | + $where[$table . '.status !'] = 'draft'; |
|
421 | 421 | } |
422 | 422 | break; |
423 | 423 | case 'actions': |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | case 'items': |
431 | 431 | // $join = "INNER JOIN {$wpdb->prefix}frm_item_metas im ON ($table.id = im.item_id)"; |
432 | 432 | if ( $args['ids'] ) { |
433 | - $where[ $table . '.form_id' ] = $args['ids']; |
|
433 | + $where[$table . '.form_id'] = $args['ids']; |
|
434 | 434 | } |
435 | 435 | break; |
436 | 436 | case 'styles': |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | } |
472 | 472 | } |
473 | 473 | |
474 | - $records[ $tb_type ] = FrmDb::get_col( $table . $join, $where, $select ); |
|
474 | + $records[$tb_type] = FrmDb::get_col( $table . $join, $where, $select ); |
|
475 | 475 | unset( $tb_type ); |
476 | 476 | } |
477 | 477 | |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | $no_export_fields = FrmField::no_save_fields(); |
617 | 617 | foreach ( $csv_fields as $k => $f ) { |
618 | 618 | if ( in_array( $f->type, $no_export_fields, true ) ) { |
619 | - unset( $csv_fields[ $k ] ); |
|
619 | + unset( $csv_fields[$k] ); |
|
620 | 620 | } |
621 | 621 | } |
622 | 622 |
@@ -9,6 +9,6 @@ |
||
9 | 9 | $type = $field['type']; |
10 | 10 | do_action( 'frm_after_checkbox', compact( 'field', 'field_name', 'type' ) ); |
11 | 11 | } else { |
12 | - $read_only = $field['read_only']; |
|
12 | + $read_only = $field['read_only']; |
|
13 | 13 | include dirname( __FILE__ ) . '/' . $field['type'] . '-field.php'; |
14 | 14 | } |