@@ -118,8 +118,8 @@ |
||
| 118 | 118 | $frm_inc_tax[] = $term->term_id; |
| 119 | 119 | ?> |
| 120 | 120 | <term><term_id><?php echo esc_html( $term->term_id ); ?></term_id><term_taxonomy><?php echo esc_html( $term->taxonomy ); ?></term_taxonomy><?php |
| 121 | - if ( ! empty( $parent_slugs[ $term->parent ] ) ) { |
|
| 122 | - echo '<term_parent>' . esc_html( $parent_slugs[ $term->parent ] ) . '</term_parent>'; |
|
| 121 | + if ( ! empty( $parent_slugs[$term->parent] ) ) { |
|
| 122 | + echo '<term_parent>' . esc_html( $parent_slugs[$term->parent] ) . '</term_parent>'; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | if ( ! empty( $term->name ) ) { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $page = $this->get_pagenum(); |
| 33 | 33 | $per_page = $this->get_items_per_page( 'formidable_page_formidable_per_page' ); |
| 34 | 34 | |
| 35 | - $mode = self::get_param( |
|
| 35 | + $mode = self::get_param( |
|
| 36 | 36 | array( |
| 37 | 37 | 'param' => 'mode', |
| 38 | 38 | 'default' => 'list', |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | 'default' => 'name', |
| 45 | 45 | ) |
| 46 | 46 | ); |
| 47 | - $order = self::get_param( |
|
| 47 | + $order = self::get_param( |
|
| 48 | 48 | array( |
| 49 | 49 | 'param' => 'order', |
| 50 | 50 | 'default' => 'ASC', |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $counts = FrmForm::get_count(); |
| 190 | 190 | $form_type = FrmAppHelper::simple_get( 'form_type', 'sanitize_title', 'published' ); |
| 191 | 191 | |
| 192 | - if ( isset( $statuses[ $form_type ] ) ) { |
|
| 192 | + if ( isset( $statuses[$form_type] ) ) { |
|
| 193 | 193 | $counts->$form_type = $this->total_items; |
| 194 | 194 | } |
| 195 | 195 | |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | |
| 207 | 207 | if ( $counts->{$status} || 'draft' !== $status ) { |
| 208 | 208 | /* translators: %1$s: Status, %2$s: Number of items */ |
| 209 | - $links[ $status ] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>'; |
|
| 209 | + $links[$status] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>'; |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | unset( $status, $name ); |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | $new_actions = FrmFormsHelper::get_action_links( $item->id, $item ); |
| 417 | 417 | |
| 418 | 418 | foreach ( $new_actions as $link => $action ) { |
| 419 | - $new_actions[ $link ] = FrmFormsHelper::format_link_html( $action, 'short' ); |
|
| 419 | + $new_actions[$link] = FrmFormsHelper::format_link_html( $action, 'short' ); |
|
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | if ( 'trash' === $this->status ) { |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | wp_enqueue_script( 'formidable_settings' ); |
| 29 | 29 | return FrmAppHelper::clip( |
| 30 | 30 | // @phpstan-ignore-next-line |
| 31 | - function () use ( $id, $name, $args ) { |
|
| 31 | + function() use ( $id, $name, $args ) { |
|
| 32 | 32 | require FrmAppHelper::plugin_path() . '/classes/views/shared/toggle.php'; |
| 33 | 33 | }, |
| 34 | 34 | $args['echo'] ?? false |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | unset( $filename ); |
| 157 | 157 | |
| 158 | - $comment_count = FrmDb::get_count( |
|
| 158 | + $comment_count = FrmDb::get_count( |
|
| 159 | 159 | 'frm_item_metas', |
| 160 | 160 | array( |
| 161 | 161 | 'item_id' => $atts['entry_ids'], |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | private static function prepare_csv_headings() { |
| 321 | 321 | $headings = array(); |
| 322 | 322 | self::csv_headings( $headings ); |
| 323 | - $headings = apply_filters( |
|
| 323 | + $headings = apply_filters( |
|
| 324 | 324 | 'frm_csv_columns', |
| 325 | 325 | $headings, |
| 326 | 326 | self::$form_id, |
@@ -351,13 +351,13 @@ discard block |
||
| 351 | 351 | $separate_values = array( 'user_id', 'file', 'data', 'date' ); |
| 352 | 352 | |
| 353 | 353 | if ( ! empty( $col->field_options['separate_value'] ) && ! in_array( $col->type, $separate_values, true ) ) { |
| 354 | - $field_headings[ $col->id . '_label' ] = strip_tags( $col->name . ' ' . __( '(label)', 'formidable' ) ); |
|
| 354 | + $field_headings[$col->id . '_label'] = strip_tags( $col->name . ' ' . __( '(label)', 'formidable' ) ); |
|
| 355 | 355 | } |
| 356 | 356 | |
| 357 | - if ( ! empty( $field_headings[ $col->id . '_label' ] ) ) { |
|
| 358 | - $field_headings[ $col->id ] = strip_tags( $col->name . ' ' . __( '(value)', 'formidable' ) ); |
|
| 357 | + if ( ! empty( $field_headings[$col->id . '_label'] ) ) { |
|
| 358 | + $field_headings[$col->id] = strip_tags( $col->name . ' ' . __( '(value)', 'formidable' ) ); |
|
| 359 | 359 | } else { |
| 360 | - $field_headings[ $col->id ] = strip_tags( $col->name ); |
|
| 360 | + $field_headings[$col->id] = strip_tags( $col->name ); |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | return apply_filters( |
@@ -383,14 +383,14 @@ discard block |
||
| 383 | 383 | if ( self::is_the_child_of_a_repeater( $col ) ) { |
| 384 | 384 | $repeater_id = $col->field_options['in_section']; |
| 385 | 385 | // Set a placeholder to maintain order for repeater fields. |
| 386 | - $headings[ 'repeater' . $repeater_id ] = array(); |
|
| 386 | + $headings['repeater' . $repeater_id] = array(); |
|
| 387 | 387 | |
| 388 | - if ( ! isset( $fields_by_repeater_id[ $repeater_id ] ) ) { |
|
| 389 | - $fields_by_repeater_id[ $repeater_id ] = array(); |
|
| 388 | + if ( ! isset( $fields_by_repeater_id[$repeater_id] ) ) { |
|
| 389 | + $fields_by_repeater_id[$repeater_id] = array(); |
|
| 390 | 390 | $repeater_ids[] = $repeater_id; |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | - $fields_by_repeater_id[ $repeater_id ][] = $col; |
|
| 393 | + $fields_by_repeater_id[$repeater_id][] = $col; |
|
| 394 | 394 | |
| 395 | 395 | continue; |
| 396 | 396 | } |
@@ -409,8 +409,8 @@ discard block |
||
| 409 | 409 | $end = strpos( $row->meta_value, ':{' ); |
| 410 | 410 | $length = substr( $row->meta_value, $start, $end - $start ); |
| 411 | 411 | |
| 412 | - if ( $length > $max[ $row->field_id ] ) { |
|
| 413 | - $max[ $row->field_id ] = $length; |
|
| 412 | + if ( $length > $max[$row->field_id] ) { |
|
| 413 | + $max[$row->field_id] = $length; |
|
| 414 | 414 | } |
| 415 | 415 | } |
| 416 | 416 | unset( $start, $end, $length, $row, $repeater_meta, $where ); |
@@ -423,17 +423,17 @@ discard block |
||
| 423 | 423 | |
| 424 | 424 | $repeater_headings = array(); |
| 425 | 425 | |
| 426 | - foreach ( $fields_by_repeater_id[ $repeater_id ] as $col ) { |
|
| 426 | + foreach ( $fields_by_repeater_id[$repeater_id] as $col ) { |
|
| 427 | 427 | $repeater_headings += self::field_headings( $col ); |
| 428 | 428 | } |
| 429 | 429 | |
| 430 | - for ( $i = 0; $i < $max[ $repeater_id ]; $i++ ) { |
|
| 430 | + for ( $i = 0; $i < $max[$repeater_id]; $i ++ ) { |
|
| 431 | 431 | foreach ( $repeater_headings as $repeater_key => $repeater_name ) { |
| 432 | - $flat[ $repeater_key . '[' . $i . ']' ] = $repeater_name; |
|
| 432 | + $flat[$repeater_key . '[' . $i . ']'] = $repeater_name; |
|
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | } else { |
| 436 | - $flat[ $key ] = $heading; |
|
| 436 | + $flat[$key] = $heading; |
|
| 437 | 437 | } |
| 438 | 438 | } |
| 439 | 439 | |
@@ -446,10 +446,10 @@ discard block |
||
| 446 | 446 | }//end if |
| 447 | 447 | |
| 448 | 448 | if ( self::$comment_count ) { |
| 449 | - for ( $i = 0; $i < self::$comment_count; $i++ ) { |
|
| 450 | - $headings[ 'comment' . $i ] = __( 'Comment', 'formidable' ); |
|
| 451 | - $headings[ 'comment_user_id' . $i ] = __( 'Comment User', 'formidable' ); |
|
| 452 | - $headings[ 'comment_created_at' . $i ] = __( 'Comment Date', 'formidable' ); |
|
| 449 | + for ( $i = 0; $i < self::$comment_count; $i ++ ) { |
|
| 450 | + $headings['comment' . $i] = __( 'Comment', 'formidable' ); |
|
| 451 | + $headings['comment_user_id' . $i] = __( 'Comment User', 'formidable' ); |
|
| 452 | + $headings['comment_created_at' . $i] = __( 'Comment Date', 'formidable' ); |
|
| 453 | 453 | } |
| 454 | 454 | unset( $i ); |
| 455 | 455 | } |
@@ -569,32 +569,32 @@ discard block |
||
| 569 | 569 | continue; |
| 570 | 570 | } |
| 571 | 571 | |
| 572 | - if ( ! isset( $entries[ self::$entry->parent_item_id ] ) ) { |
|
| 573 | - $entries[ self::$entry->parent_item_id ] = new stdClass(); |
|
| 574 | - $entries[ self::$entry->parent_item_id ]->metas = array(); |
|
| 572 | + if ( ! isset( $entries[self::$entry->parent_item_id] ) ) { |
|
| 573 | + $entries[self::$entry->parent_item_id] = new stdClass(); |
|
| 574 | + $entries[self::$entry->parent_item_id]->metas = array(); |
|
| 575 | 575 | } |
| 576 | 576 | |
| 577 | - if ( ! isset( $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] ) ) { |
|
| 578 | - $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] = array(); |
|
| 579 | - } elseif ( ! is_array( $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] ) ) { |
|
| 577 | + if ( ! isset( $entries[self::$entry->parent_item_id]->metas[$meta_id] ) ) { |
|
| 578 | + $entries[self::$entry->parent_item_id]->metas[$meta_id] = array(); |
|
| 579 | + } elseif ( ! is_array( $entries[self::$entry->parent_item_id]->metas[$meta_id] ) ) { |
|
| 580 | 580 | // if the data is here, it should be an array but if this field has collected data |
| 581 | 581 | // both while inside and outside of the repeating section, it's possible this is a string. |
| 582 | - $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] = (array) $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ]; |
|
| 582 | + $entries[self::$entry->parent_item_id]->metas[$meta_id] = (array) $entries[self::$entry->parent_item_id]->metas[$meta_id]; |
|
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | // Add the repeated values. |
| 586 | - $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ][] = $meta_value; |
|
| 586 | + $entries[self::$entry->parent_item_id]->metas[$meta_id][] = $meta_value; |
|
| 587 | 587 | }//end foreach |
| 588 | 588 | |
| 589 | 589 | self::$entry->metas = self::fill_missing_repeater_metas( self::$entry->metas, $entries ); |
| 590 | - $entries[ self::$entry->parent_item_id ]->metas += self::$entry->metas; |
|
| 590 | + $entries[self::$entry->parent_item_id]->metas += self::$entry->metas; |
|
| 591 | 591 | }//end if |
| 592 | 592 | |
| 593 | 593 | // add the embedded form id |
| 594 | - if ( ! isset( $entries[ self::$entry->parent_item_id ]->embedded_fields ) ) { |
|
| 595 | - $entries[ self::$entry->parent_item_id ]->embedded_fields = array(); |
|
| 594 | + if ( ! isset( $entries[self::$entry->parent_item_id]->embedded_fields ) ) { |
|
| 595 | + $entries[self::$entry->parent_item_id]->embedded_fields = array(); |
|
| 596 | 596 | } |
| 597 | - $entries[ self::$entry->parent_item_id ]->embedded_fields[ self::$entry->id ] = self::$entry->form_id; |
|
| 597 | + $entries[self::$entry->parent_item_id]->embedded_fields[self::$entry->id] = self::$entry->form_id; |
|
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | /** |
@@ -617,19 +617,19 @@ discard block |
||
| 617 | 617 | |
| 618 | 618 | $repeater_id = $field->field_options['in_section']; |
| 619 | 619 | |
| 620 | - if ( ! isset( self::$fields_by_repeater_id[ $repeater_id ] ) ) { |
|
| 620 | + if ( ! isset( self::$fields_by_repeater_id[$repeater_id] ) ) { |
|
| 621 | 621 | return $metas; |
| 622 | 622 | } |
| 623 | 623 | |
| 624 | - foreach ( self::$fields_by_repeater_id[ $repeater_id ] as $repeater_child ) { |
|
| 625 | - if ( ! isset( $metas[ $repeater_child->id ] ) ) { |
|
| 626 | - $metas[ $repeater_child->id ] = ''; |
|
| 624 | + foreach ( self::$fields_by_repeater_id[$repeater_id] as $repeater_child ) { |
|
| 625 | + if ( ! isset( $metas[$repeater_child->id] ) ) { |
|
| 626 | + $metas[$repeater_child->id] = ''; |
|
| 627 | 627 | |
| 628 | - if ( ! isset( $entries[ self::$entry->parent_item_id ]->metas[ $repeater_child->id ] ) || ! is_array( $entries[ self::$entry->parent_item_id ]->metas[ $repeater_child->id ] ) ) { |
|
| 629 | - $entries[ self::$entry->parent_item_id ]->metas[ $repeater_child->id ] = array(); |
|
| 628 | + if ( ! isset( $entries[self::$entry->parent_item_id]->metas[$repeater_child->id] ) || ! is_array( $entries[self::$entry->parent_item_id]->metas[$repeater_child->id] ) ) { |
|
| 629 | + $entries[self::$entry->parent_item_id]->metas[$repeater_child->id] = array(); |
|
| 630 | 630 | } |
| 631 | 631 | |
| 632 | - $entries[ self::$entry->parent_item_id ]->metas[ $repeater_child->id ][] = ''; |
|
| 632 | + $entries[self::$entry->parent_item_id]->metas[$repeater_child->id][] = ''; |
|
| 633 | 633 | } |
| 634 | 634 | } |
| 635 | 635 | |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | */ |
| 660 | 660 | private static function add_field_values_to_csv( &$row ) { |
| 661 | 661 | foreach ( self::$fields as $col ) { |
| 662 | - $field_value = self::$entry->metas[ $col->id ] ?? false; |
|
| 662 | + $field_value = self::$entry->metas[$col->id] ?? false; |
|
| 663 | 663 | |
| 664 | 664 | FrmFieldsHelper::prepare_field_value( $field_value, $col->type ); |
| 665 | 665 | self::add_array_values_to_columns( $row, compact( 'col', 'field_value' ) ); |
@@ -679,20 +679,20 @@ discard block |
||
| 679 | 679 | $label_key = $col->id . '_label'; |
| 680 | 680 | |
| 681 | 681 | if ( self::is_the_child_of_a_repeater( $col ) ) { |
| 682 | - $row[ $label_key ] = array(); |
|
| 682 | + $row[$label_key] = array(); |
|
| 683 | 683 | |
| 684 | 684 | if ( is_array( $field_value ) ) { |
| 685 | 685 | foreach ( $field_value as $value ) { |
| 686 | - $row[ $label_key ][] = self::get_separate_value_label( $value, $col ); |
|
| 686 | + $row[$label_key][] = self::get_separate_value_label( $value, $col ); |
|
| 687 | 687 | } |
| 688 | 688 | } |
| 689 | 689 | } else { |
| 690 | - $row[ $label_key ] = self::get_separate_value_label( $field_value, $col ); |
|
| 690 | + $row[$label_key] = self::get_separate_value_label( $field_value, $col ); |
|
| 691 | 691 | } |
| 692 | 692 | unset( $label_key ); |
| 693 | 693 | } |
| 694 | 694 | |
| 695 | - $row[ $col->id ] = $field_value; |
|
| 695 | + $row[$col->id] = $field_value; |
|
| 696 | 696 | |
| 697 | 697 | unset( $col, $field_value ); |
| 698 | 698 | }//end foreach |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | 'show_icon' => false, |
| 717 | 717 | 'entry_id' => self::$entry->id, |
| 718 | 718 | 'sep' => self::$separator, |
| 719 | - 'embedded_field_id' => isset( self::$entry->embedded_fields ) && isset( self::$entry->embedded_fields[ self::$entry->id ] ) ? 'form' . self::$entry->embedded_fields[ self::$entry->id ] : 0, |
|
| 719 | + 'embedded_field_id' => isset( self::$entry->embedded_fields ) && isset( self::$entry->embedded_fields[self::$entry->id] ) ? 'form' . self::$entry->embedded_fields[self::$entry->id] : 0, |
|
| 720 | 720 | ) |
| 721 | 721 | ); |
| 722 | 722 | } |
@@ -737,8 +737,8 @@ discard block |
||
| 737 | 737 | foreach ( $sub_value as $sub_key => $sub_sub_value ) { |
| 738 | 738 | $column_key = $atts['col']->id . '_' . $sub_key . '[' . $key . ']'; |
| 739 | 739 | |
| 740 | - if ( ! is_numeric( $sub_key ) && isset( self::$headings[ $column_key ] ) ) { |
|
| 741 | - $row[ $column_key ] = $sub_sub_value; |
|
| 740 | + if ( ! is_numeric( $sub_key ) && isset( self::$headings[$column_key] ) ) { |
|
| 741 | + $row[$column_key] = $sub_sub_value; |
|
| 742 | 742 | } |
| 743 | 743 | } |
| 744 | 744 | |
@@ -747,8 +747,8 @@ discard block |
||
| 747 | 747 | |
| 748 | 748 | $column_key = $atts['col']->id . '_' . $key; |
| 749 | 749 | |
| 750 | - if ( ! is_numeric( $key ) && isset( self::$headings[ $column_key ] ) ) { |
|
| 751 | - $row[ $column_key ] = $sub_value; |
|
| 750 | + if ( ! is_numeric( $key ) && isset( self::$headings[$column_key] ) ) { |
|
| 751 | + $row[$column_key] = $sub_value; |
|
| 752 | 752 | } |
| 753 | 753 | } |
| 754 | 754 | }//end if |
@@ -784,19 +784,19 @@ discard block |
||
| 784 | 784 | $echo = 'echo' === self::$mode; |
| 785 | 785 | |
| 786 | 786 | foreach ( self::$headings as $k => $heading ) { |
| 787 | - if ( isset( $rows[ $k ] ) ) { |
|
| 788 | - $row = $rows[ $k ]; |
|
| 787 | + if ( isset( $rows[$k] ) ) { |
|
| 788 | + $row = $rows[$k]; |
|
| 789 | 789 | } else { |
| 790 | 790 | $row = ''; |
| 791 | 791 | |
| 792 | 792 | // array indexed data is not at $rows[ $k ] |
| 793 | - if ( $k[ strlen( $k ) - 1 ] === ']' ) { |
|
| 793 | + if ( $k[strlen( $k ) - 1] === ']' ) { |
|
| 794 | 794 | $start = strrpos( $k, '[' ); |
| 795 | - $key = substr( $k, 0, $start++ ); |
|
| 795 | + $key = substr( $k, 0, $start ++ ); |
|
| 796 | 796 | $index = substr( $k, $start, strlen( $k ) - 1 - $start ); |
| 797 | 797 | |
| 798 | - if ( isset( $rows[ $key ] ) && isset( $rows[ $key ][ $index ] ) ) { |
|
| 799 | - $row = $rows[ $key ][ $index ]; |
|
| 798 | + if ( isset( $rows[$key] ) && isset( $rows[$key][$index] ) ) { |
|
| 799 | + $row = $rows[$key][$index]; |
|
| 800 | 800 | } |
| 801 | 801 | |
| 802 | 802 | unset( $start, $key, $index ); |
@@ -504,8 +504,8 @@ discard block |
||
| 504 | 504 | return $values; |
| 505 | 505 | } |
| 506 | 506 | |
| 507 | - if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[ $field->id ] ) ) { |
|
| 508 | - $values['value'] = $previous_entry->metas[ $field->id ]; |
|
| 507 | + if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[$field->id] ) ) { |
|
| 508 | + $values['value'] = $previous_entry->metas[$field->id]; |
|
| 509 | 509 | } |
| 510 | 510 | |
| 511 | 511 | $frm_vars['trans_filled'] = true; |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | * |
| 543 | 543 | * @return void |
| 544 | 544 | */ |
| 545 | - function () use ( $entry_id, &$destroy_callback ) { |
|
| 545 | + function() use ( $entry_id, &$destroy_callback ) { |
|
| 546 | 546 | FrmEntry::destroy( $entry_id ); |
| 547 | 547 | // Only call this once. |
| 548 | 548 | remove_action( 'frm_entry_form', $destroy_callback ); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $is_stripe = $gateway === 'stripe' || ( is_array( $gateway ) && in_array( 'stripe', $gateway, true ) ); |
| 79 | 79 | |
| 80 | 80 | if ( ! $is_stripe || empty( $payment_action->post_content['amount'] ) ) { |
| 81 | - unset( $payment_actions[ $k ] ); |
|
| 81 | + unset( $payment_actions[$k] ); |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | return $payment_actions; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | 'run_triggers' => false, |
| 118 | 118 | 'show_errors' => true, |
| 119 | 119 | ); |
| 120 | - $atts = compact( 'action', 'entry', 'form' ); |
|
| 120 | + $atts = compact( 'action', 'entry', 'form' ); |
|
| 121 | 121 | |
| 122 | 122 | $amount = self::prepare_amount( $action->post_content['amount'], $atts ); |
| 123 | 123 | |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | |
| 522 | 522 | foreach ( $settings as $k => $s ) { |
| 523 | 523 | if ( is_string( $s ) ) { |
| 524 | - $settings[ $k ] = str_replace( $disallowed, '', $s ); |
|
| 524 | + $settings[$k] = str_replace( $disallowed, '', $s ); |
|
| 525 | 525 | } |
| 526 | 526 | } |
| 527 | 527 | |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | * @return array |
| 651 | 651 | */ |
| 652 | 652 | public static function remove_cc_validation( $errors, $field, $values ) { |
| 653 | - $has_processed = isset( $_POST[ 'frmintent' . $field->form_id ] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 653 | + $has_processed = isset( $_POST['frmintent' . $field->form_id] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 654 | 654 | |
| 655 | 655 | if ( ! $has_processed ) { |
| 656 | 656 | return $errors; |
@@ -658,12 +658,12 @@ discard block |
||
| 658 | 658 | |
| 659 | 659 | $field_id = $field->temp_id ?? $field->id; |
| 660 | 660 | |
| 661 | - if ( isset( $errors[ 'field' . $field_id . '-cc' ] ) ) { |
|
| 662 | - unset( $errors[ 'field' . $field_id . '-cc' ] ); |
|
| 661 | + if ( isset( $errors['field' . $field_id . '-cc'] ) ) { |
|
| 662 | + unset( $errors['field' . $field_id . '-cc'] ); |
|
| 663 | 663 | } |
| 664 | 664 | |
| 665 | - if ( isset( $errors[ 'field' . $field_id ] ) ) { |
|
| 666 | - unset( $errors[ 'field' . $field_id ] ); |
|
| 665 | + if ( isset( $errors['field' . $field_id] ) ) { |
|
| 666 | + unset( $errors['field' . $field_id] ); |
|
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | return $errors; |