|
@@ -396,7 +396,7 @@ discard block |
|
|
block discarded – undo |
|
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
|
|
|
@@ -425,10 +425,10 @@ discard block |
|
|
block discarded – undo |
|
425
|
425
|
$new_action->post_title = $value; |
|
426
|
426
|
} elseif ( is_array( $value ) ) { |
|
427
|
427
|
foreach ( $value as $k2 => $v2 ) { |
|
428
|
|
- $new_action->post_content[ $key ][ $k2 ] = $this->replace_smart_tags( $v2, $form['fields'] ); |
|
|
428
|
+ $new_action->post_content[$key][$k2] = $this->replace_smart_tags( $v2, $form['fields'] ); |
|
429
|
429
|
} |
|
430
|
430
|
} else { |
|
431
|
|
- $new_action->post_content[ $key ] = $this->replace_smart_tags( $value, $form['fields'] ); |
|
|
431
|
+ $new_action->post_content[$key] = $this->replace_smart_tags( $value, $form['fields'] ); |
|
432
|
432
|
} |
|
433
|
433
|
} |
|
434
|
434
|
|
|
@@ -447,7 +447,7 @@ discard block |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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; |