@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | protected function create_fields( $form_id, &$form ) { |
| 397 | 397 | foreach ( $form['fields'] as $key => $new_field ) { |
| 398 | 398 | $new_field['form_id'] = $form_id; |
| 399 | - $form['fields'][ $key ]['id'] = FrmField::create( $new_field ); |
|
| 399 | + $form['fields'][$key]['id'] = FrmField::create( $new_field ); |
|
| 400 | 400 | } |
| 401 | 401 | } |
| 402 | 402 | |
@@ -423,12 +423,12 @@ discard block |
||
| 423 | 423 | foreach ( $action as $key => $value ) { |
| 424 | 424 | if ( $key === 'post_title' ) { |
| 425 | 425 | $new_action->post_title = $value; |
| 426 | - } elseif( $key === 'the_post_title' ) { |
|
| 426 | + } elseif ( $key === 'the_post_title' ) { |
|
| 427 | 427 | $new_action->post_content['post_title'] = $value; |
| 428 | 428 | } elseif ( is_string( $value ) ) { |
| 429 | - $new_action->post_content[ $key ] = $this->replace_smart_tags( $value, $form['fields'] ); |
|
| 429 | + $new_action->post_content[$key] = $this->replace_smart_tags( $value, $form['fields'] ); |
|
| 430 | 430 | } else { |
| 431 | - $new_action->post_content[ $key ] = $value; |
|
| 431 | + $new_action->post_content[$key] = $value; |
|
| 432 | 432 | } |
| 433 | 433 | } |
| 434 | 434 | |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | |
| 448 | 448 | $imported = $this->get_tracked_import(); |
| 449 | 449 | |
| 450 | - $imported[ $this->slug ][ $new_form_id ] = $source_id; |
|
| 450 | + $imported[$this->slug][$new_form_id] = $source_id; |
|
| 451 | 451 | |
| 452 | 452 | update_option( $this->tracking, $imported, false ); |
| 453 | 453 | } |
@@ -467,11 +467,11 @@ discard block |
||
| 467 | 467 | private function is_imported( $source_id ) { |
| 468 | 468 | $imported = $this->get_tracked_import(); |
| 469 | 469 | $new_form_id = 0; |
| 470 | - if ( ! isset( $imported[ $this->slug ] ) || ! in_array( $source_id, $imported[ $this->slug ] ) ) { |
|
| 470 | + if ( ! isset( $imported[$this->slug] ) || ! in_array( $source_id, $imported[$this->slug] ) ) { |
|
| 471 | 471 | return $new_form_id; |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | - $new_form_id = array_search( $source_id, array_reverse( $imported[ $this->slug ], true ) ); |
|
| 474 | + $new_form_id = array_search( $source_id, array_reverse( $imported[$this->slug], true ) ); |
|
| 475 | 475 | if ( ! empty( $new_form_id ) && empty( FrmForm::get_key_by_id( $new_form_id ) ) ) { |
| 476 | 476 | // Allow reimport if the form was deleted. |
| 477 | 477 | $new_form_id = 0; |