@@ -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 } ?> |
@@ -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 | |
@@ -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 | } |
@@ -283,7 +283,7 @@ |
||
| 283 | 283 | 'content' => 'upgrade', |
| 284 | 284 | ) |
| 285 | 285 | ); |
| 286 | - $renew_link = FrmAppHelper::admin_upgrade_link( |
|
| 286 | + $renew_link = FrmAppHelper::admin_upgrade_link( |
|
| 287 | 287 | array( |
| 288 | 288 | 'medium' => 'new-template', |
| 289 | 289 | 'content' => 'renew', |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $s_query['it.form_id'] = $form_id; |
| 26 | 26 | $join_form_in_query = false; |
| 27 | 27 | } else { |
| 28 | - $s_query[] = array( |
|
| 28 | + $s_query[] = array( |
|
| 29 | 29 | 'or' => 1, |
| 30 | 30 | 'parent_form_id' => null, |
| 31 | 31 | 'parent_form_id <' => 1, |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | if ( strpos( $orderby, 'meta' ) !== false ) { |
| 58 | 58 | $order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) ); |
| 59 | - $orderby .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '+0' : ''; |
|
| 59 | + $orderby .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '+0' : ''; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | $order = self::get_param( |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | $r = "<tr id='item-action-{$item->id}'$style>"; |
| 191 | 191 | |
| 192 | - list( $columns, $hidden, , $primary ) = $this->get_column_info(); |
|
| 192 | + list( $columns, $hidden,, $primary ) = $this->get_column_info(); |
|
| 193 | 193 | $action_col = false; |
| 194 | 194 | $action_columns = $this->get_action_columns(); |
| 195 | 195 | |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | |
| 6 | 6 | class FrmFormTemplateApi extends FrmFormApi { |
| 7 | 7 | |
| 8 | - protected static $code_option_name = 'frm_free_license_code'; |
|
| 8 | + protected static $code_option_name = 'frm_free_license_code'; |
|
| 9 | 9 | |
| 10 | 10 | private static $base_api_url = 'https://formidableforms.com/wp-json/form-templates/v1/'; |
| 11 | 11 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | $templates = $this->get_api_info(); |
| 78 | 78 | $contact_form = 20872734; |
| 79 | - return isset( $templates[ $contact_form ] ) && ! empty( $templates[ $contact_form ]['url'] ); |
|
| 79 | + return isset( $templates[$contact_form] ) && ! empty( $templates[$contact_form]['url'] ); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -137,15 +137,15 @@ discard block |
||
| 137 | 137 | continue; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - $data['urlByKey'][ $template['key'] ] = $template['url']; |
|
| 140 | + $data['urlByKey'][$template['key']] = $template['url']; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - if ( ! isset( $data['urlByKey'][ $key ] ) ) { |
|
| 143 | + if ( ! isset( $data['urlByKey'][$key] ) ) { |
|
| 144 | 144 | $error = new WP_Error( 400, 'We were unable to retrieve the template' ); |
| 145 | 145 | wp_send_json_error( $error ); |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - $data['url'] = $data['urlByKey'][ $key ]; |
|
| 148 | + $data['url'] = $data['urlByKey'][$key]; |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | wp_send_json_success( $data ); |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | 'name' => 'FrmFieldName', |
| 103 | 103 | ); |
| 104 | 104 | |
| 105 | - $class = isset( $type_classes[ $field_type ] ) ? $type_classes[ $field_type ] : ''; |
|
| 105 | + $class = isset( $type_classes[$field_type] ) ? $type_classes[$field_type] : ''; |
|
| 106 | 106 | |
| 107 | 107 | return apply_filters( 'frm_get_field_type_class', $class, $field_type ); |
| 108 | 108 | } |