@@ -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 |
@@ -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(); |
@@ -100,7 +100,7 @@ |
||
100 | 100 | 'secondary-button-role' => 'button', |
101 | 101 | 'secondary-button-skip-step' => true, |
102 | 102 | ); |
103 | - $args = wp_parse_args( $args, $defaults ); |
|
103 | + $args = wp_parse_args( $args, $defaults ); |
|
104 | 104 | |
105 | 105 | // Set the primary button attributes. |
106 | 106 | $primary_button_attributes = array( |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | // Build total for each currency. |
151 | 151 | foreach ( $payment_data['total'] as $currency => $amount ) { |
152 | - $stats[ 'payments_total_' . $currency ] = array( |
|
152 | + $stats['payments_total_' . $currency] = array( |
|
153 | 153 | // translators: currency name. |
154 | 154 | 'label' => sprintf( __( 'Total %s', 'formidable' ), strtoupper( $currency ) ), |
155 | 155 | 'count' => $amount, |
@@ -171,23 +171,23 @@ discard block |
||
171 | 171 | |
172 | 172 | // Compare total for each currency. |
173 | 173 | foreach ( $payment_data['total'] as $currency => $amount ) { |
174 | - if ( ! isset( $prev_payment_data['total'][ $currency ] ) ) { |
|
175 | - $stats[ 'payments_total_' . $currency ]['compare'] = 1; |
|
174 | + if ( ! isset( $prev_payment_data['total'][$currency] ) ) { |
|
175 | + $stats['payments_total_' . $currency]['compare'] = 1; |
|
176 | 176 | continue; |
177 | 177 | } |
178 | 178 | |
179 | - $stats[ 'payments_total_' . $currency ]['compare'] = $this->get_compare_diff( $amount, $prev_payment_data['total'][ $currency ] ); |
|
180 | - unset( $prev_payment_data['total'][ $currency ] ); |
|
179 | + $stats['payments_total_' . $currency]['compare'] = $this->get_compare_diff( $amount, $prev_payment_data['total'][$currency] ); |
|
180 | + unset( $prev_payment_data['total'][$currency] ); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | // If prev month has more currencies. |
184 | 184 | foreach ( $prev_payment_data['total'] as $currency => $amount ) { |
185 | - $stats[ 'payments_total_' . $currency ] = array( |
|
185 | + $stats['payments_total_' . $currency] = array( |
|
186 | 186 | // translators: currency name. |
187 | 187 | 'label' => sprintf( __( 'Total %s', 'formidable' ), strtoupper( $currency ) ), |
188 | 188 | 'count' => 0, |
189 | 189 | 'display' => $this->get_formatted_price( 0, $currency ), |
190 | - 'compare' => -1, |
|
190 | + 'compare' => - 1, |
|
191 | 191 | ); |
192 | 192 | } |
193 | 193 | }//end if |
@@ -80,20 +80,20 @@ discard block |
||
80 | 80 | 'name' => sprintf( |
81 | 81 | /* translators: Formidable addon name */ |
82 | 82 | esc_html_x( 'Formidable %s', 'Formidable Addon Name', 'formidable' ), |
83 | - $addon_list[ $matching_addon ]['name'] |
|
83 | + $addon_list[$matching_addon]['name'] |
|
84 | 84 | ), |
85 | - 'addon' => $addon_list[ $matching_addon ]['slug'], |
|
86 | - 'short_description' => $addon_list[ $matching_addon ]['excerpt'], |
|
85 | + 'addon' => $addon_list[$matching_addon]['slug'], |
|
86 | + 'short_description' => $addon_list[$matching_addon]['excerpt'], |
|
87 | 87 | 'slug' => self::$slug, |
88 | - 'version' => $addon_list[ $matching_addon ]['version'], |
|
88 | + 'version' => $addon_list[$matching_addon]['version'], |
|
89 | 89 | ); |
90 | 90 | |
91 | - if ( ! empty( $addon_list[ $matching_addon ]['external'] ) ) { |
|
91 | + if ( ! empty( $addon_list[$matching_addon]['external'] ) ) { |
|
92 | 92 | unset( $overrides['name'] ); |
93 | 93 | } |
94 | 94 | |
95 | 95 | // Splice in the base addon data. |
96 | - $inject = array_merge( $inject, $addon_list[ $matching_addon ], $overrides ); |
|
96 | + $inject = array_merge( $inject, $addon_list[$matching_addon], $overrides ); |
|
97 | 97 | |
98 | 98 | // Add it to the top of the list. |
99 | 99 | array_unshift( $result->plugins, $inject ); |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | // Plugin installed, active, feature not enabled; prompt to enable. |
309 | 309 | if ( ! $is_active && $is_installed ) { |
310 | 310 | if ( current_user_can( 'activate_plugins' ) ) { |
311 | - $activate_url = add_query_arg( |
|
311 | + $activate_url = add_query_arg( |
|
312 | 312 | array( |
313 | 313 | 'action' => 'activate', |
314 | 314 | '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin['plugin'] ), |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | */ |
353 | 353 | protected function is_installed( $plugin ) { |
354 | 354 | $all_plugins = FrmAppHelper::get_plugins(); |
355 | - return isset( $all_plugins[ $plugin ] ); |
|
355 | + return isset( $all_plugins[$plugin] ); |
|
356 | 356 | } |
357 | 357 | |
358 | 358 | /** |