@@ -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 | |
@@ -108,19 +108,19 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | foreach ( $action_controls as $action ) { |
| 111 | - if ( isset( $groups[ $action->id_base ] ) || in_array( $action->id_base, $grouped ) ) { |
|
| 111 | + if ( isset( $groups[$action->id_base] ) || in_array( $action->id_base, $grouped ) ) { |
|
| 112 | 112 | continue; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | $this_group = $action->action_options['group']; |
| 116 | - if ( ! isset( $groups[ $this_group ] ) ) { |
|
| 116 | + if ( ! isset( $groups[$this_group] ) ) { |
|
| 117 | 117 | $this_group = 'misc'; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - if ( ! isset( $groups[ $this_group ]['actions'] ) ) { |
|
| 121 | - $groups[ $this_group ]['actions'] = array(); |
|
| 120 | + if ( ! isset( $groups[$this_group]['actions'] ) ) { |
|
| 121 | + $groups[$this_group]['actions'] = array(); |
|
| 122 | 122 | } |
| 123 | - $groups[ $this_group ]['actions'][] = $action->id_base; |
|
| 123 | + $groups[$this_group]['actions'][] = $action->id_base; |
|
| 124 | 124 | |
| 125 | 125 | unset( $action ); |
| 126 | 126 | } |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | return $a; |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | - $actions[ $a->id_base ] = $a; |
|
| 273 | + $actions[$a->id_base] = $a; |
|
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | return $actions; |
@@ -301,16 +301,16 @@ discard block |
||
| 301 | 301 | $action_map = array(); |
| 302 | 302 | |
| 303 | 303 | foreach ( $action_controls as $key => $control ) { |
| 304 | - $action_map[ $control->id_base ] = $key; |
|
| 304 | + $action_map[$control->id_base] = $key; |
|
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | foreach ( $form_actions as $action ) { |
| 308 | - if ( ! isset( $action_map[ $action->post_excerpt ] ) ) { |
|
| 308 | + if ( ! isset( $action_map[$action->post_excerpt] ) ) { |
|
| 309 | 309 | // don't try and show settings if action no longer exists |
| 310 | 310 | continue; |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | - self::action_control( $action, $form, $action->ID, $action_controls[ $action_map[ $action->post_excerpt ] ], $values ); |
|
| 313 | + self::action_control( $action, $form, $action->ID, $action_controls[$action_map[$action->post_excerpt]], $values ); |
|
| 314 | 314 | } |
| 315 | 315 | } |
| 316 | 316 | |
@@ -539,8 +539,8 @@ discard block |
||
| 539 | 539 | } |
| 540 | 540 | |
| 541 | 541 | // Store actions so they can be triggered with the correct priority. |
| 542 | - $stored_actions[ $action->ID ] = $action; |
|
| 543 | - $action_priority[ $action->ID ] = $link_settings[ $action->post_excerpt ]->action_options['priority']; |
|
| 542 | + $stored_actions[$action->ID] = $action; |
|
| 543 | + $action_priority[$action->ID] = $link_settings[$action->post_excerpt]->action_options['priority']; |
|
| 544 | 544 | |
| 545 | 545 | unset( $action ); |
| 546 | 546 | }//end foreach |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | new FrmNotification(); |
| 553 | 553 | |
| 554 | 554 | foreach ( $action_priority as $action_id => $priority ) { |
| 555 | - $action = $stored_actions[ $action_id ]; |
|
| 555 | + $action = $stored_actions[$action_id]; |
|
| 556 | 556 | do_action( 'frm_trigger_' . $action->post_excerpt . '_action', $action, $entry, $form, $event ); |
| 557 | 557 | do_action( 'frm_trigger_' . $action->post_excerpt . '_' . $event . '_action', $action, $entry, $form ); |
| 558 | 558 | |
@@ -599,12 +599,12 @@ discard block |
||
| 599 | 599 | } |
| 600 | 600 | |
| 601 | 601 | public function register( $action_class ) { |
| 602 | - $this->actions[ $action_class ] = new $action_class(); |
|
| 602 | + $this->actions[$action_class] = new $action_class(); |
|
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | public function unregister( $action_class ) { |
| 606 | - if ( isset( $this->actions[ $action_class ] ) ) { |
|
| 607 | - unset( $this->actions[ $action_class ] ); |
|
| 606 | + if ( isset( $this->actions[$action_class] ) ) { |
|
| 607 | + unset( $this->actions[$action_class] ); |
|
| 608 | 608 | } |
| 609 | 609 | } |
| 610 | 610 | |
@@ -613,8 +613,8 @@ discard block |
||
| 613 | 613 | |
| 614 | 614 | foreach ( $keys as $key ) { |
| 615 | 615 | // don't register new action if old action with the same id is already registered |
| 616 | - if ( ! isset( $this->actions[ $key ] ) ) { |
|
| 617 | - $this->actions[ $key ]->_register(); |
|
| 616 | + if ( ! isset( $this->actions[$key] ) ) { |
|
| 617 | + $this->actions[$key]->_register(); |
|
| 618 | 618 | } |
| 619 | 619 | } |
| 620 | 620 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $section['function'] = $original; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - $sections[ $key ] = $section; |
|
| 161 | + $sections[$key] = $section; |
|
| 162 | 162 | }//end foreach |
| 163 | 163 | |
| 164 | 164 | return $sections; |
@@ -170,11 +170,11 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | $section = FrmAppHelper::get_post_param( 'tab', '', 'sanitize_text_field' ); |
| 172 | 172 | $sections = self::get_settings_tabs(); |
| 173 | - if ( ! isset( $sections[ $section ] ) ) { |
|
| 173 | + if ( ! isset( $sections[$section] ) ) { |
|
| 174 | 174 | wp_die(); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - $section = $sections[ $section ]; |
|
| 177 | + $section = $sections[$section]; |
|
| 178 | 178 | |
| 179 | 179 | if ( isset( $section['class'] ) ) { |
| 180 | 180 | call_user_func( array( $section['class'], $section['function'] ) ); |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | return; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - $selected_xml = isset( $form['xml'] ) && isset( $form['xml'][ $selected_form ] ) ? $form['xml'][ $selected_form ] : ''; |
|
| 166 | + $selected_xml = isset( $form['xml'] ) && isset( $form['xml'][$selected_form] ) ? $form['xml'][$selected_form] : ''; |
|
| 167 | 167 | if ( empty( $selected_xml ) || strpos( $selected_xml, 'http' ) !== 0 ) { |
| 168 | 168 | return; |
| 169 | 169 | } |
@@ -178,8 +178,8 @@ discard block |
||
| 178 | 178 | * @param string $value |
| 179 | 179 | */ |
| 180 | 180 | private static function get_selected_in_form( $form, $value = 'form' ) { |
| 181 | - if ( ! empty( $form ) && isset( $form[ $value ] ) && ! empty( $form[ $value ] ) ) { |
|
| 182 | - return $form[ $value ]; |
|
| 181 | + if ( ! empty( $form ) && isset( $form[$value] ) && ! empty( $form[$value] ) ) { |
|
| 182 | + return $form[$value]; |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | return ''; |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | if ( $for === 'view' ) { |
| 211 | - $item_key = is_array( $view_keys ) ? $view_keys[ $form_key ] : $view_keys; |
|
| 211 | + $item_key = is_array( $view_keys ) ? $view_keys[$form_key] : $view_keys; |
|
| 212 | 212 | $shortcode = '[display-frm-data id=%1$s filter=limited]'; |
| 213 | 213 | } elseif ( $for === 'form' ) { |
| 214 | 214 | $item_key = $form_key; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | continue; |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - $page_ids[ $for ] = wp_insert_post( |
|
| 226 | + $page_ids[$for] = wp_insert_post( |
|
| 227 | 227 | array( |
| 228 | 228 | 'post_title' => $name, |
| 229 | 229 | 'post_type' => 'page', |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash |
| 378 | 378 | $file_type = sanitize_option( 'upload_path', $_FILES['frm_import_file']['name'] ); |
| 379 | 379 | $file_type = strtolower( pathinfo( $file_type, PATHINFO_EXTENSION ) ); |
| 380 | - if ( 'xml' !== $file_type && isset( $export_format[ $file_type ] ) ) { |
|
| 380 | + if ( 'xml' !== $file_type && isset( $export_format[$file_type] ) ) { |
|
| 381 | 381 | // allow other file types to be imported |
| 382 | 382 | do_action( 'frm_before_import_' . $file_type ); |
| 383 | 383 | |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | foreach ( $type as $tb_type ) { |
| 472 | 472 | $where = array(); |
| 473 | 473 | $join = ''; |
| 474 | - $table = $tables[ $tb_type ]; |
|
| 474 | + $table = $tables[$tb_type]; |
|
| 475 | 475 | |
| 476 | 476 | $select = $table . '.id'; |
| 477 | 477 | $query_vars = array(); |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | $table . '.parent_form_id' => $args['ids'], |
| 487 | 487 | ); |
| 488 | 488 | } else { |
| 489 | - $where[ $table . '.status !' ] = 'draft'; |
|
| 489 | + $where[$table . '.status !'] = 'draft'; |
|
| 490 | 490 | } |
| 491 | 491 | break; |
| 492 | 492 | case 'actions': |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | case 'items': |
| 500 | 500 | // $join = "INNER JOIN {$wpdb->prefix}frm_item_metas im ON ($table.id = im.item_id)"; |
| 501 | 501 | if ( $args['ids'] ) { |
| 502 | - $where[ $table . '.form_id' ] = $args['ids']; |
|
| 502 | + $where[$table . '.form_id'] = $args['ids']; |
|
| 503 | 503 | } |
| 504 | 504 | break; |
| 505 | 505 | case 'styles': |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | } |
| 541 | 541 | }//end switch |
| 542 | 542 | |
| 543 | - $records[ $tb_type ] = FrmDb::get_col( $table . $join, $where, $select ); |
|
| 543 | + $records[$tb_type] = FrmDb::get_col( $table . $join, $where, $select ); |
|
| 544 | 544 | unset( $tb_type ); |
| 545 | 545 | }//end foreach |
| 546 | 546 | |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | $no_export_fields = FrmField::no_save_fields(); |
| 713 | 713 | foreach ( $csv_fields as $k => $f ) { |
| 714 | 714 | if ( in_array( $f->type, $no_export_fields, true ) ) { |
| 715 | - unset( $csv_fields[ $k ] ); |
|
| 715 | + unset( $csv_fields[$k] ); |
|
| 716 | 716 | } |
| 717 | 717 | } |
| 718 | 718 | |