@@ -148,13 +148,13 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | $is_setup_intent = 0 === strpos( $intent->id, 'seti_' ); |
| 150 | 150 | if ( $is_setup_intent ) { |
| 151 | - $errors[ 'field' . $cc_field_id ] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : ''; |
|
| 151 | + $errors['field' . $cc_field_id] = is_object( $intent->last_setup_error ) ? $intent->last_setup_error->message : ''; |
|
| 152 | 152 | } else { |
| 153 | - $errors[ 'field' . $cc_field_id ] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : ''; |
|
| 153 | + $errors['field' . $cc_field_id] = is_object( $intent->last_payment_error ) ? $intent->last_payment_error->message : ''; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - if ( ! $errors[ 'field' . $cc_field_id ] ) { |
|
| 157 | - $errors[ 'field' . $cc_field_id ] = 'Payment was not successfully processed.'; |
|
| 156 | + if ( ! $errors['field' . $cc_field_id] ) { |
|
| 157 | + $errors['field' . $cc_field_id] = 'Payment was not successfully processed.'; |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | global $frm_vars; |
@@ -182,10 +182,10 @@ discard block |
||
| 182 | 182 | $save_draft = ! empty( $form->options['save_draft'] ); |
| 183 | 183 | |
| 184 | 184 | global $frm_vars; |
| 185 | - $frm_vars['created_entries'][ $form_id ]['errors'] = $errors; |
|
| 185 | + $frm_vars['created_entries'][$form_id]['errors'] = $errors; |
|
| 186 | 186 | |
| 187 | 187 | // Set to true to get FrmProFieldsHelper::get_page_with_error() run. |
| 188 | - $_POST[ 'frm_page_order_' . $form_id ] = true; |
|
| 188 | + $_POST['frm_page_order_' . $form_id] = true; |
|
| 189 | 189 | |
| 190 | 190 | if ( ! $save_draft ) { |
| 191 | 191 | // If draft saving is not on, delete the entry. |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | // If draft saving is on, load the draft entry. |
| 197 | - $frm_vars['created_entries'][ $form_id ]['entry_id'] = $entry_id; |
|
| 197 | + $frm_vars['created_entries'][$form_id]['entry_id'] = $entry_id; |
|
| 198 | 198 | add_action( |
| 199 | 199 | 'frm_filter_final_form', |
| 200 | 200 | /** |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | * @param int $entry_id |
| 205 | 205 | * @return string |
| 206 | 206 | */ |
| 207 | - function ( $html ) use ( $entry_id ) { |
|
| 207 | + function( $html ) use ( $entry_id ) { |
|
| 208 | 208 | global $wpdb; |
| 209 | 209 | $wpdb->update( $wpdb->prefix . 'frm_items', array( 'is_draft' => 1 ), array( 'id' => $entry_id ) ); |
| 210 | 210 | return $html; |
@@ -393,8 +393,8 @@ discard block |
||
| 393 | 393 | return $values; |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | - if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[ $field->id ] ) ) { |
|
| 397 | - $values['value'] = $previous_entry->metas[ $field->id ]; |
|
| 396 | + if ( is_array( $previous_entry->metas ) && isset( $previous_entry->metas[$field->id] ) ) { |
|
| 397 | + $values['value'] = $previous_entry->metas[$field->id]; |
|
| 398 | 398 | } |
| 399 | 399 | |
| 400 | 400 | $frm_vars['trans_filled'] = true; |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | * @param Closure $destroy_callback |
| 430 | 430 | * @return void |
| 431 | 431 | */ |
| 432 | - function () use ( $entry_id, &$destroy_callback ) { |
|
| 432 | + function() use ( $entry_id, &$destroy_callback ) { |
|
| 433 | 433 | FrmEntry::destroy( $entry_id ); |
| 434 | 434 | // Only call this once. |
| 435 | 435 | remove_action( 'frm_entry_form', $destroy_callback ); |
@@ -148,7 +148,7 @@ |
||
| 148 | 148 | |
| 149 | 149 | register_deactivation_hook( |
| 150 | 150 | __FILE__, |
| 151 | - function () { |
|
| 151 | + function() { |
|
| 152 | 152 | if ( ! class_exists( 'FrmCronController', false ) ) { |
| 153 | 153 | require_once __DIR__ . '/classes/controllers/FrmCronController.php'; |
| 154 | 154 | } |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | 'form' => $entry->form_id, |
| 150 | 150 | 'value' => $action->post_content['description'], |
| 151 | 151 | ); |
| 152 | - $new_values = array( 'description' => FrmTransLiteAppHelper::process_shortcodes( $shortcode_atts ) ); |
|
| 152 | + $new_values = array( 'description' => FrmTransLiteAppHelper::process_shortcodes( $shortcode_atts ) ); |
|
| 153 | 153 | FrmStrpLiteAppHelper::call_stripe_helper_class( 'update_intent', $intent->id, $new_values ); |
| 154 | 154 | } |
| 155 | 155 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $intent_is_processing = 'processing' === $intent->status; |
| 58 | 58 | if ( $intent_is_processing ) { |
| 59 | 59 | // Append an additional processing message to the end of the success message. |
| 60 | - $filter = function ( $message ) { |
|
| 60 | + $filter = function( $message ) { |
|
| 61 | 61 | $stripe_settings = FrmStrpLiteAppHelper::get_settings(); |
| 62 | 62 | $message .= '<p>' . esc_html( $stripe_settings->settings->processing_message ) . '</p>'; |
| 63 | 63 | return $message; |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | $atts['form'] = FrmForm::getOne( $atts['entry']->form_id ); |
| 162 | 162 | $atts['entry_id'] = $atts['entry']->id; |
| 163 | 163 | $opt = 'success_action'; |
| 164 | - $atts['conf_method'] = ! empty( $atts['form']->options[ $opt ] ) ? $atts['form']->options[ $opt ] : 'message'; |
|
| 164 | + $atts['conf_method'] = ! empty( $atts['form']->options[$opt] ) ? $atts['form']->options[$opt] : 'message'; |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
@@ -238,10 +238,10 @@ discard block |
||
| 238 | 238 | */ |
| 239 | 239 | public static function get_payment_intents( $name ) { |
| 240 | 240 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 241 | - if ( ! isset( $_POST[ $name ] ) ) { |
|
| 241 | + if ( ! isset( $_POST[$name] ) ) { |
|
| 242 | 242 | return array(); |
| 243 | 243 | } |
| 244 | - $intents = $_POST[ $name ]; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 244 | + $intents = $_POST[$name]; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
|
| 245 | 245 | FrmAppHelper::sanitize_value( 'sanitize_text_field', $intents ); |
| 246 | 246 | return $intents; |
| 247 | 247 | } |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | self::format_form_data( $form ); |
| 269 | 269 | |
| 270 | 270 | $form_id = absint( $form['form_id'] ); |
| 271 | - $intents = isset( $form[ 'frmintent' . $form_id ] ) ? $form[ 'frmintent' . $form_id ] : array(); |
|
| 271 | + $intents = isset( $form['frmintent' . $form_id] ) ? $form['frmintent' . $form_id] : array(); |
|
| 272 | 272 | |
| 273 | 273 | if ( empty( $intents ) ) { |
| 274 | 274 | wp_die(); |
@@ -278,8 +278,8 @@ discard block |
||
| 278 | 278 | $intents = array( $intents ); |
| 279 | 279 | } else { |
| 280 | 280 | foreach ( $intents as $k => $intent ) { |
| 281 | - if ( is_array( $intent ) && isset( $intent[ $k ] ) ) { |
|
| 282 | - $intents[ $k ] = $intent[ $k ]; |
|
| 281 | + if ( is_array( $intent ) && isset( $intent[$k] ) ) { |
|
| 282 | + $intents[$k] = $intent[$k]; |
|
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | 285 | } |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | if ( $saved->metadata->action != $action->ID ) { |
| 333 | 333 | continue; |
| 334 | 334 | } |
| 335 | - $intents[ $k ] = array( |
|
| 335 | + $intents[$k] = array( |
|
| 336 | 336 | 'id' => $intent, |
| 337 | 337 | 'action' => $action->ID, |
| 338 | 338 | ); |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | if ( $k === 'item_meta' ) { |
| 376 | 376 | foreach ( $v as $f => $value ) { |
| 377 | 377 | FrmAppHelper::sanitize_value( 'wp_kses_post', $value ); |
| 378 | - $entry->metas[ absint( $f ) ] = $value; |
|
| 378 | + $entry->metas[absint( $f )] = $value; |
|
| 379 | 379 | } |
| 380 | 380 | } else { |
| 381 | 381 | FrmAppHelper::sanitize_value( 'wp_kses_post', $v ); |
@@ -399,14 +399,14 @@ discard block |
||
| 399 | 399 | |
| 400 | 400 | foreach ( $form as $input ) { |
| 401 | 401 | $key = $input['name']; |
| 402 | - if ( isset( $formatted[ $key ] ) ) { |
|
| 403 | - if ( is_array( $formatted[ $key ] ) ) { |
|
| 404 | - $formatted[ $key ][] = $input['value']; |
|
| 402 | + if ( isset( $formatted[$key] ) ) { |
|
| 403 | + if ( is_array( $formatted[$key] ) ) { |
|
| 404 | + $formatted[$key][] = $input['value']; |
|
| 405 | 405 | } else { |
| 406 | - $formatted[ $key ] = array( $formatted[ $key ], $input['value'] ); |
|
| 406 | + $formatted[$key] = array( $formatted[$key], $input['value'] ); |
|
| 407 | 407 | } |
| 408 | 408 | } else { |
| 409 | - $formatted[ $key ] = $input['value']; |
|
| 409 | + $formatted[$key] = $input['value']; |
|
| 410 | 410 | } |
| 411 | 411 | } |
| 412 | 412 | |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | |
| 550 | 550 | foreach ( $actions as $k => $action ) { |
| 551 | 551 | $amount = self::get_amount_before_submit( compact( 'action', 'form' ) ); |
| 552 | - $actions[ $k ]->post_content['amount'] = $amount; |
|
| 552 | + $actions[$k]->post_content['amount'] = $amount; |
|
| 553 | 553 | } |
| 554 | 554 | } |
| 555 | 555 | |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | $info['url'] = $xml; |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | - $disabled = isset( $imported[ $info['form'] ] ) ? ' disabled' : ''; |
|
| 14 | + $disabled = isset( $imported[$info['form']] ) ? ' disabled' : ''; |
|
| 15 | 15 | $url = isset( $info['url'] ) ? $info['url'] : ''; |
| 16 | 16 | $value = $importing === 'form' ? $info['form'] : $info['key']; |
| 17 | 17 | if ( ! isset( $info['img'] ) ) { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | continue; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - $hide_views = $importing === 'view' && ( ( $selected && $info['form'] !== $selected ) || isset( $imported[ $info['form'] ] ) ); |
|
| 24 | + $hide_views = $importing === 'view' && ( ( $selected && $info['form'] !== $selected ) || isset( $imported[$info['form']] ) ); |
|
| 25 | 25 | ?> |
| 26 | 26 | <div class="frm_radio radio-inline radio frm_image_option<?php echo esc_attr( $importing === 'view' ? ' show_sub_opt show_' . $info['form'] : '' ); ?>" style="<?php echo esc_attr( $hide_views ? 'display:none' : '' ); ?>"> |
| 27 | 27 | <?php if ( $importing === 'form' ) { ?> |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | <?php } ?> |
| 42 | 42 | /> |
| 43 | 43 | <div class="frm_image_option_container frm_label_with_image"> |
| 44 | - <?php echo FrmAppHelper::kses( $info['img'], array( 'svg', 'rect', 'path' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
|
| 44 | + <?php echo FrmAppHelper::kses( $info['img'], array( 'svg', 'rect', 'path' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
|
| 45 | 45 | <span class="frm_text_label_for_image"> |
| 46 | 46 | <?php |
| 47 | 47 | if ( ! empty( $disabled ) ) { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | if ( $importing === 'form' && $disabled ) { |
| 57 | - echo FrmAppHelper::kses( FrmFormsHelper::edit_form_link( $imported[ $info['form'] ] ), array( 'a' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
| 57 | + echo FrmAppHelper::kses( FrmFormsHelper::edit_form_link( $imported[$info['form']] ), array( 'a' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
| 58 | 58 | } else { |
| 59 | 59 | echo esc_html( $info['name'] ); |
| 60 | 60 | } |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | $grid_helper = new FrmFieldGridHelper(); |
| 53 | 53 | $values['count'] = 0; |
| 54 | 54 | foreach ( $values['fields'] as $field ) { |
| 55 | - ++$values['count']; |
|
| 55 | + ++ $values['count']; |
|
| 56 | 56 | $grid_helper->set_field( $field ); |
| 57 | 57 | $grid_helper->maybe_begin_field_wrapper(); |
| 58 | 58 | FrmFieldsController::load_single_field( $field, $values ); |
@@ -217,7 +217,7 @@ |
||
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | if ( false !== $this->parent_li ) { |
| 220 | - ++$this->current_field_count; |
|
| 220 | + ++ $this->current_field_count; |
|
| 221 | 221 | $this->current_list_size += $this->active_field_size; |
| 222 | 222 | if ( 12 === $this->current_list_size ) { |
| 223 | 223 | $this->close_field_wrapper(); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $form_ids = $this->get_form_ids( $form_id ); |
| 135 | 135 | $s_query['it.form_id'] = count( $form_ids ) > 1 ? $form_ids : $form_ids[0]; |
| 136 | 136 | } else { |
| 137 | - $s_query[] = array( |
|
| 137 | + $s_query[] = array( |
|
| 138 | 138 | 'or' => 1, |
| 139 | 139 | 'parent_form_id' => null, |
| 140 | 140 | 'parent_form_id <' => 1, |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | |
| 284 | 284 | $r = "<tr id='item-action-{$item->id}'$style>"; |
| 285 | 285 | |
| 286 | - list( $columns, $hidden, , $primary ) = $this->get_column_info(); |
|
| 286 | + list( $columns, $hidden,, $primary ) = $this->get_column_info(); |
|
| 287 | 287 | $action_col = false; |
| 288 | 288 | $action_columns = $this->get_action_columns(); |
| 289 | 289 | |