@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | public function insert_installed_addon( $plugins ) { |
45 | - $plugins[ $this->plugin_slug ] = $this; |
|
45 | + $plugins[$this->plugin_slug] = $this; |
|
46 | 46 | |
47 | 47 | return $plugins; |
48 | 48 | } |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | public static function get_addon( $plugin_slug ) { |
51 | 51 | $plugins = apply_filters( 'frm_installed_addons', array() ); |
52 | 52 | $plugin = false; |
53 | - if ( isset( $plugins[ $plugin_slug ] ) ) { |
|
54 | - $plugin = $plugins[ $plugin_slug ]; |
|
53 | + if ( isset( $plugins[$plugin_slug] ) ) { |
|
54 | + $plugin = $plugins[$plugin_slug]; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return $plugin; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } else { |
112 | 112 | $api = new FrmFormApi( $this->license ); |
113 | 113 | $plugins = $api->get_api_info(); |
114 | - $_data = $plugins[ $item_id ]; |
|
114 | + $_data = $plugins[$item_id]; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | $_data['sections'] = array( |
@@ -340,19 +340,19 @@ discard block |
||
340 | 340 | |
341 | 341 | if ( $this->is_current_version( $transient ) ) { |
342 | 342 | // Make sure it doesn't show there is an update if plugin is up-to-date. |
343 | - if ( isset( $transient->response[ $this->plugin_folder ] ) ) { |
|
344 | - unset( $transient->response[ $this->plugin_folder ] ); |
|
343 | + if ( isset( $transient->response[$this->plugin_folder] ) ) { |
|
344 | + unset( $transient->response[$this->plugin_folder] ); |
|
345 | 345 | } |
346 | - } elseif ( isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) ) { |
|
347 | - $this->prepare_update_details( $transient->response[ $this->plugin_folder ] ); |
|
346 | + } elseif ( isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) ) { |
|
347 | + $this->prepare_update_details( $transient->response[$this->plugin_folder] ); |
|
348 | 348 | |
349 | 349 | // if the transient has expired, clear the update and trigger it again |
350 | - if ( $transient->response[ $this->plugin_folder ] === false ) { |
|
350 | + if ( $transient->response[$this->plugin_folder] === false ) { |
|
351 | 351 | if ( ! $this->has_been_cleared() ) { |
352 | 352 | $this->cleared_plugins(); |
353 | 353 | $this->manually_queue_update(); |
354 | 354 | } |
355 | - unset( $transient->response[ $this->plugin_folder ] ); |
|
355 | + unset( $transient->response[$this->plugin_folder] ); |
|
356 | 356 | } |
357 | 357 | } |
358 | 358 | |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | } |
441 | 441 | |
442 | 442 | private function is_current_version( $transient ) { |
443 | - if ( empty( $transient->checked ) || ! isset( $transient->checked[ $this->plugin_folder ] ) ) { |
|
443 | + if ( empty( $transient->checked ) || ! isset( $transient->checked[$this->plugin_folder] ) ) { |
|
444 | 444 | return false; |
445 | 445 | } |
446 | 446 | |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | return true; |
450 | 450 | } |
451 | 451 | |
452 | - return isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) && $transient->checked[ $this->plugin_folder ] === $transient->response[ $this->plugin_folder ]->new_version; |
|
452 | + return isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) && $transient->checked[$this->plugin_folder] === $transient->response[$this->plugin_folder]->new_version; |
|
453 | 453 | } |
454 | 454 | |
455 | 455 | private function has_been_cleared() { |
@@ -564,8 +564,8 @@ discard block |
||
564 | 564 | $response['message'] = $response['status']; |
565 | 565 | } else { |
566 | 566 | $messages = $this->get_messages(); |
567 | - if ( is_string( $response['status'] ) && isset( $messages[ $response['status'] ] ) ) { |
|
568 | - $response['message'] = $messages[ $response['status'] ]; |
|
567 | + if ( is_string( $response['status'] ) && isset( $messages[$response['status']] ) ) { |
|
568 | + $response['message'] = $messages[$response['status']]; |
|
569 | 569 | } else { |
570 | 570 | $response['message'] = FrmAppHelper::kses( $response['status'], array( 'a' ) ); |
571 | 571 | } |
@@ -465,7 +465,8 @@ |
||
465 | 465 | } |
466 | 466 | |
467 | 467 | private function is_license_revoked() { |
468 | - if ( empty( $this->license ) || empty( $this->plugin_slug ) || isset( $_POST['license'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
468 | + if ( empty( $this->license ) || empty( $this->plugin_slug ) || isset( $_POST['license'] ) ) { |
|
469 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
469 | 470 | return; |
470 | 471 | } |
471 | 472 |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | '-' => 'down', |
127 | 127 | '+' => 'up', |
128 | 128 | ); |
129 | - $class = 'frm_arrow' . $arrow[ $icon ]; |
|
129 | + $class = 'frm_arrow' . $arrow[$icon]; |
|
130 | 130 | } else { |
131 | 131 | // frm_minus1_icon. |
132 | 132 | $key = str_replace( 'p', '', $key ); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | '-' => 'minus', |
135 | 135 | '+' => 'plus', |
136 | 136 | ); |
137 | - $class = 'frm_' . $plus[ $icon ]; |
|
137 | + $class = 'frm_' . $plus[$icon]; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | if ( $key ) { |
@@ -160,8 +160,8 @@ discard block |
||
160 | 160 | ?> |
161 | 161 | <div class="btn-group" id="frm_<?php echo esc_attr( $name ); ?>_select"> |
162 | 162 | <button class="multiselect dropdown-toggle btn btn-default" data-toggle="dropdown" type="button"> |
163 | - <?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[ $name ], '+', $type ) ); ?> |
|
164 | - <?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[ $name ], '-', $type ) ); ?> |
|
163 | + <?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[$name], '+', $type ) ); ?> |
|
164 | + <?php FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $style->post_content[$name], '-', $type ) ); ?> |
|
165 | 165 | <b class="caret"></b> |
166 | 166 | </button> |
167 | 167 | <ul class="multiselect-container frm-dropdown-menu"> |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | <li <?php echo ( $style->post_content['collapse_icon'] == $key ) ? 'class="active"' : ''; ?>> |
170 | 170 | <a href="javascript:void(0);"> |
171 | 171 | <label> |
172 | - <input type="radio" value="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $frm_style->get_field_name( $name ) ); ?>" <?php checked( $style->post_content[ $name ], $key ); ?> /> |
|
172 | + <input type="radio" value="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $frm_style->get_field_name( $name ) ); ?>" <?php checked( $style->post_content[$name], $key ); ?> /> |
|
173 | 173 | <span> |
174 | 174 | <?php |
175 | 175 | FrmAppHelper::icon_by_class( 'frmfont ' . self::icon_key_to_class( $key, '+', $type ) ); |
@@ -306,15 +306,15 @@ discard block |
||
306 | 306 | $vars = array_diff( $vars, $remove ); |
307 | 307 | |
308 | 308 | foreach ( $vars as $var ) { |
309 | - if ( ! isset( $settings[ $var ] ) ) { |
|
309 | + if ( ! isset( $settings[$var] ) ) { |
|
310 | 310 | continue; |
311 | 311 | } |
312 | - if ( ! isset( $defaults[ $var ] ) ) { |
|
313 | - $defaults[ $var ] = ''; |
|
312 | + if ( ! isset( $defaults[$var] ) ) { |
|
313 | + $defaults[$var] = ''; |
|
314 | 314 | } |
315 | - $show = empty( $defaults ) || ( $settings[ $var ] !== '' && $settings[ $var ] !== $defaults[ $var ] ); |
|
315 | + $show = empty( $defaults ) || ( $settings[$var] !== '' && $settings[$var] !== $defaults[$var] ); |
|
316 | 316 | if ( $show ) { |
317 | - echo '--' . esc_html( str_replace( '_', '-', $var ) ) . ':' . ( $var === 'font' ? FrmAppHelper::kses( $settings[ $var ] ) : esc_html( $settings[ $var ] ) ) . ';'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
317 | + echo '--' . esc_html( str_replace( '_', '-', $var ) ) . ':' . ( $var === 'font' ? FrmAppHelper::kses( $settings[$var] ) : esc_html( $settings[$var] ) ) . ';'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
318 | 318 | } |
319 | 319 | } |
320 | 320 | } |
@@ -363,8 +363,8 @@ discard block |
||
363 | 363 | |
364 | 364 | $checkbox_opts = array( 'important_style', 'auto_width', 'submit_style', 'collapse_icon', 'center_form' ); |
365 | 365 | foreach ( $checkbox_opts as $opt ) { |
366 | - if ( ! isset( $settings[ $opt ] ) ) { |
|
367 | - $settings[ $opt ] = 0; |
|
366 | + if ( ! isset( $settings[$opt] ) ) { |
|
367 | + $settings[$opt] = 0; |
|
368 | 368 | } |
369 | 369 | } |
370 | 370 | |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $css = ''; |
393 | 393 | } |
394 | 394 | foreach ( $opts as $opt ) { |
395 | - self::get_color_output( $css, $settings[ $opt ] ); |
|
395 | + self::get_color_output( $css, $settings[$opt] ); |
|
396 | 396 | } |
397 | 397 | } |
398 | 398 | } |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | |
148 | 148 | $is_setup_intent = 0 === strpos( $intent->id, 'seti_' ); |
149 | 149 | if ( $is_setup_intent ) { |
150 | - $errors[ 'field' . $cc_field_id ] = $intent->last_setup_error->message; |
|
150 | + $errors['field' . $cc_field_id] = $intent->last_setup_error->message; |
|
151 | 151 | } else { |
152 | - $errors[ 'field' . $cc_field_id ] = $intent->last_payment_error->message; |
|
152 | + $errors['field' . $cc_field_id] = $intent->last_payment_error->message; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | global $frm_vars; |
@@ -177,10 +177,10 @@ discard block |
||
177 | 177 | $save_draft = ! empty( $form->options['save_draft'] ); |
178 | 178 | |
179 | 179 | global $frm_vars; |
180 | - $frm_vars['created_entries'][ $form_id ]['errors'] = $errors; |
|
180 | + $frm_vars['created_entries'][$form_id]['errors'] = $errors; |
|
181 | 181 | |
182 | 182 | // Set to true to get FrmProFieldsHelper::get_page_with_error() run. |
183 | - $_POST[ 'frm_page_order_' . $form_id ] = true; |
|
183 | + $_POST['frm_page_order_' . $form_id] = true; |
|
184 | 184 | |
185 | 185 | if ( ! $save_draft ) { |
186 | 186 | // If draft saving is not on, delete the entry. |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | } |
190 | 190 | |
191 | 191 | // If draft saving is on, load the draft entry. |
192 | - $frm_vars['created_entries'][ $form_id ]['entry_id'] = $entry_id; |
|
192 | + $frm_vars['created_entries'][$form_id]['entry_id'] = $entry_id; |
|
193 | 193 | add_action( |
194 | 194 | 'frm_filter_final_form', |
195 | 195 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | 'user_id' => get_current_user_id(), |
109 | 109 | 'frm_strp_connect_mode' => $mode, |
110 | 110 | ); |
111 | - $data = self::post_to_connect_server( 'initialize', $additional_body ); |
|
111 | + $data = self::post_to_connect_server( 'initialize', $additional_body ); |
|
112 | 112 | |
113 | 113 | if ( is_string( $data ) ) { |
114 | 114 | return $data; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @return object|string |
144 | 144 | */ |
145 | 145 | private static function post_to_connect_server( $action, $additional_body = array() ) { |
146 | - $body = array( |
|
146 | + $body = array( |
|
147 | 147 | 'frm_strp_connect_action' => $action, |
148 | 148 | 'frm_strp_connect_mode' => FrmStrpLiteAppHelper::active_mode(), |
149 | 149 | ); |
@@ -18,17 +18,17 @@ discard block |
||
18 | 18 | |
19 | 19 | foreach ( $type as $tb_type ) { |
20 | 20 | |
21 | - if ( ! isset( $tables[ $tb_type ] ) ) { |
|
21 | + if ( ! isset( $tables[$tb_type] ) ) { |
|
22 | 22 | do_action( 'frm_xml_import_' . $tb_type, $args ); |
23 | 23 | continue; |
24 | 24 | } |
25 | 25 | |
26 | - if ( ! isset( $records[ $tb_type ] ) ) { |
|
26 | + if ( ! isset( $records[$tb_type] ) ) { |
|
27 | 27 | // No records. |
28 | 28 | continue; |
29 | 29 | } |
30 | 30 | |
31 | - $item_ids = $records[ $tb_type ]; |
|
31 | + $item_ids = $records[$tb_type]; |
|
32 | 32 | |
33 | 33 | if ( in_array( $tb_type, array( 'styles', 'actions' ), true ) ) { |
34 | 34 | include dirname( __FILE__ ) . '/posts_xml.php'; |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | include FrmProAppHelper::plugin_path() . '/classes/views/xml/' . $tb_type . '_xml.php'; |
39 | 39 | } |
40 | 40 | |
41 | - unset( $item_ids, $records[ $tb_type ], $tb_type ); |
|
41 | + unset( $item_ids, $records[$tb_type], $tb_type ); |
|
42 | 42 | }//end foreach |
43 | 43 | |
44 | 44 | /** |
@@ -87,6 +87,6 @@ |
||
87 | 87 | |
88 | 88 | ?></div> |
89 | 89 | <?php |
90 | - ++$option_index; |
|
90 | + ++ $option_index; |
|
91 | 91 | }//end foreach |
92 | 92 | }//end if |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $sub_field_class = "frm_form_field form-field frm_form_subfield-{$name} {$sub_field['wrapper_classes']}"; |
42 | 42 | $sub_field_desc = FrmField::get_option( $field, $name . '_desc' ); |
43 | 43 | |
44 | - if ( isset( $errors[ 'field' . $field_id . '-' . $name ] ) ) { |
|
44 | + if ( isset( $errors['field' . $field_id . '-' . $name] ) ) { |
|
45 | 45 | $sub_field_class .= ' frm_blank_field'; |
46 | 46 | } |
47 | 47 | ?> |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | <input |
62 | 62 | type="<?php echo esc_attr( $sub_field['type'] ); ?>" |
63 | 63 | id="<?php echo esc_attr( $html_id . '_' . $name ); ?>" |
64 | - value="<?php echo esc_attr( isset( $field_value[ $name ] ) ? $field_value[ $name ] : '' ); ?>" |
|
64 | + value="<?php echo esc_attr( isset( $field_value[$name] ) ? $field_value[$name] : '' ); ?>" |
|
65 | 65 | <?php |
66 | - if ( ! empty( $field_value[ $name ] ) ) { |
|
67 | - echo 'data-frmval="' . esc_attr( $field_value[ $name ] ) . '" '; |
|
66 | + if ( ! empty( $field_value[$name] ) ) { |
|
67 | + echo 'data-frmval="' . esc_attr( $field_value[$name] ) . '" '; |
|
68 | 68 | } |
69 | 69 | if ( empty( $args['remove_names'] ) ) { |
70 | 70 | echo 'name="' . esc_attr( $field_name ) . '[' . esc_attr( $name ) . ']" '; |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | // Don't show individual field errors when there is a combo field error. |
84 | - if ( ! empty( $errors ) && isset( $errors[ 'field' . $field_id . '-' . $name ] ) && ! isset( $errors[ 'field' . $field_id ] ) ) { |
|
84 | + if ( ! empty( $errors ) && isset( $errors['field' . $field_id . '-' . $name] ) && ! isset( $errors['field' . $field_id] ) ) { |
|
85 | 85 | ?> |
86 | - <div class="frm_error" role="alert"><?php echo esc_html( $errors[ 'field' . $field_id . '-' . $name ] ); ?></div> |
|
86 | + <div class="frm_error" role="alert"><?php echo esc_html( $errors['field' . $field_id . '-' . $name] ); ?></div> |
|
87 | 87 | <?php } ?> |
88 | 88 | </div> |
89 | 89 | <?php |
@@ -330,11 +330,11 @@ discard block |
||
330 | 330 | |
331 | 331 | // Perform add or remove operation. |
332 | 332 | if ( 'add' === $operation ) { |
333 | - self::$favorite_templates[ $key ][] = $template_id; |
|
333 | + self::$favorite_templates[$key][] = $template_id; |
|
334 | 334 | } elseif ( 'remove' === $operation ) { |
335 | - $position = array_search( $template_id, self::$favorite_templates[ $key ], true ); |
|
335 | + $position = array_search( $template_id, self::$favorite_templates[$key], true ); |
|
336 | 336 | if ( $position !== false ) { |
337 | - unset( self::$favorite_templates[ $key ][ $position ] ); |
|
337 | + unset( self::$favorite_templates[$key][$position] ); |
|
338 | 338 | } |
339 | 339 | } |
340 | 340 | |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | foreach ( self::$templates as $key => &$template ) { |
464 | 464 | // Skip the template if the categories are not set. |
465 | 465 | if ( ! isset( $template['categories'] ) ) { |
466 | - unset( self::$templates[ $key ] ); |
|
466 | + unset( self::$templates[$key] ); |
|
467 | 467 | continue; |
468 | 468 | } |
469 | 469 | |
@@ -477,14 +477,14 @@ discard block |
||
477 | 477 | // Add the slug to the new array. |
478 | 478 | $template['category_slugs'][] = $category_slug; |
479 | 479 | |
480 | - if ( ! isset( self::$categories[ $category_slug ] ) ) { |
|
481 | - self::$categories[ $category_slug ] = array( |
|
480 | + if ( ! isset( self::$categories[$category_slug] ) ) { |
|
481 | + self::$categories[$category_slug] = array( |
|
482 | 482 | 'name' => $category, |
483 | 483 | 'count' => 0, |
484 | 484 | ); |
485 | 485 | } |
486 | 486 | |
487 | - self::$categories[ $category_slug ]['count']++; |
|
487 | + self::$categories[$category_slug]['count'] ++; |
|
488 | 488 | } |
489 | 489 | |
490 | 490 | // Mark the template as favorite if it's in the favorite templates list. |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | $redundant_cats = array_merge( array( 'PayPal', 'Stripe', 'Twilio' ), FrmFormsHelper::ignore_template_categories() ); |
500 | 500 | foreach ( $redundant_cats as $redundant_cat ) { |
501 | 501 | $category_slug = sanitize_title( $redundant_cat ); |
502 | - unset( self::$categories[ $category_slug ] ); |
|
502 | + unset( self::$categories[$category_slug] ); |
|
503 | 503 | } |
504 | 504 | |
505 | 505 | // Sort the categories by keys alphabetically. |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | 'count' => 0, |
525 | 525 | ); |
526 | 526 | } |
527 | - $special_categories['all-templates'] = array( |
|
527 | + $special_categories['all-templates'] = array( |
|
528 | 528 | 'name' => __( 'All Templates', 'formidable' ), |
529 | 529 | 'count' => count( self::$templates ), |
530 | 530 | ); |
@@ -552,9 +552,9 @@ discard block |
||
552 | 552 | */ |
553 | 553 | private static function assign_featured_templates() { |
554 | 554 | foreach ( self::FEATURED_TEMPLATES_KEYS as $key ) { |
555 | - if ( isset( self::$templates[ $key ] ) ) { |
|
556 | - self::$templates[ $key ]['is_featured'] = true; |
|
557 | - self::$featured_templates[] = self::$templates[ $key ]; |
|
555 | + if ( isset( self::$templates[$key] ) ) { |
|
556 | + self::$templates[$key]['is_featured'] = true; |
|
557 | + self::$featured_templates[] = self::$templates[$key]; |
|
558 | 558 | } |
559 | 559 | } |
560 | 560 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } else { |
102 | 102 | foreach ( $addons as $k => $addon ) { |
103 | 103 | if ( empty( $addon['excerpt'] ) && $k !== 'error' ) { |
104 | - unset( $addons[ $k ] ); |
|
104 | + unset( $addons[$k] ); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | } |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | foreach ( $list as $k => $info ) { |
204 | 204 | $info['slug'] = $k; |
205 | - $list[ $k ] = array_merge( $defaults, $info ); |
|
205 | + $list[$k] = array_merge( $defaults, $info ); |
|
206 | 206 | } |
207 | 207 | return $list; |
208 | 208 | } |
@@ -353,17 +353,17 @@ discard block |
||
353 | 353 | continue; |
354 | 354 | } |
355 | 355 | |
356 | - $wp_plugin = isset( $wp_plugins[ $folder ] ) ? $wp_plugins[ $folder ] : array(); |
|
356 | + $wp_plugin = isset( $wp_plugins[$folder] ) ? $wp_plugins[$folder] : array(); |
|
357 | 357 | $wp_version = isset( $wp_plugin['Version'] ) ? $wp_plugin['Version'] : '1.0'; |
358 | 358 | $plugin->slug = explode( '/', $folder )[0]; |
359 | 359 | |
360 | 360 | if ( version_compare( $wp_version, $plugin->new_version, '<' ) ) { |
361 | - $transient->response[ $folder ] = $plugin; |
|
361 | + $transient->response[$folder] = $plugin; |
|
362 | 362 | } else { |
363 | - $transient->no_update[ $folder ] = $plugin; |
|
363 | + $transient->no_update[$folder] = $plugin; |
|
364 | 364 | } |
365 | 365 | |
366 | - $transient->checked[ $folder ] = $wp_version; |
|
366 | + $transient->checked[$folder] = $wp_version; |
|
367 | 367 | |
368 | 368 | }//end foreach |
369 | 369 | |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | */ |
397 | 397 | protected static function is_installed( $plugin ) { |
398 | 398 | $all_plugins = self::get_plugins(); |
399 | - return isset( $all_plugins[ $plugin ] ); |
|
399 | + return isset( $all_plugins[$plugin] ); |
|
400 | 400 | } |
401 | 401 | |
402 | 402 | /** |
@@ -435,13 +435,13 @@ discard block |
||
435 | 435 | } |
436 | 436 | |
437 | 437 | $download_id = isset( $plugin['id'] ) ? $plugin['id'] : 0; |
438 | - if ( ! empty( $download_id ) && ! isset( $version_info[ $download_id ]['package'] ) ) { |
|
438 | + if ( ! empty( $download_id ) && ! isset( $version_info[$download_id]['package'] ) ) { |
|
439 | 439 | // if this addon is using its own license, get the update url |
440 | 440 | $addon_info = $api->get_api_info(); |
441 | 441 | |
442 | - $version_info[ $download_id ] = $addon_info[ $download_id ]; |
|
442 | + $version_info[$download_id] = $addon_info[$download_id]; |
|
443 | 443 | if ( isset( $addon_info['error'] ) ) { |
444 | - $version_info[ $download_id ]['error'] = array( |
|
444 | + $version_info[$download_id]['error'] = array( |
|
445 | 445 | 'message' => $addon_info['error']['message'], |
446 | 446 | 'code' => $addon_info['error']['code'], |
447 | 447 | ); |
@@ -540,8 +540,8 @@ discard block |
||
540 | 540 | return $addon; |
541 | 541 | } |
542 | 542 | } |
543 | - } elseif ( isset( $addons[ $download_id ] ) ) { |
|
544 | - $plugin = $addons[ $download_id ]; |
|
543 | + } elseif ( isset( $addons[$download_id] ) ) { |
|
544 | + $plugin = $addons[$download_id]; |
|
545 | 545 | } |
546 | 546 | |
547 | 547 | return $plugin; |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | self::prepare_addon_link( $addon['link'] ); |
606 | 606 | |
607 | 607 | self::set_addon_status( $addon ); |
608 | - $addons[ $id ] = $addon; |
|
608 | + $addons[$id] = $addon; |
|
609 | 609 | }//end foreach |
610 | 610 | } |
611 | 611 | |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | 'utm_medium' => 'addons', |
647 | 647 | 'utm_campaign' => 'liteplugin', |
648 | 648 | ); |
649 | - $link = add_query_arg( $query_args, $link ); |
|
649 | + $link = add_query_arg( $query_args, $link ); |
|
650 | 650 | } |
651 | 651 | |
652 | 652 | /** |
@@ -1389,7 +1389,7 @@ discard block |
||
1389 | 1389 | $addons = $api->get_api_info(); |
1390 | 1390 | |
1391 | 1391 | if ( is_array( $addons ) && array_key_exists( $addon_id, $addons ) ) { |
1392 | - $dates = $addons[ $addon_id ]; |
|
1392 | + $dates = $addons[$addon_id]; |
|
1393 | 1393 | $requires = FrmFormsHelper::get_plan_required( $dates ); |
1394 | 1394 | } |
1395 | 1395 |