Import any XML or CSV File to WordPress - Version 3.1.1

Version Description

Download this release

Release Info

Developer soflyy
Plugin Icon 128x128 Import any XML or CSV File to WordPress
Version 3.1.1
Comparing to
See all releases

Code changes from version 3.1.0 to 3.1.1

controllers/admin/import.php CHANGED
@@ -110,7 +110,7 @@ class PMXI_Admin_Import extends PMXI_Controller_Admin {
110
 
111
  $this->data['reimported_import'] = $import = new PMXI_Import_Record();
112
  $this->data['id'] = $id = $this->input->get('id');
113
- $this->data['parent_import'] = $parent_import = $this->input->get('parent_import');
114
  if ($id and $import->getById($id)->isEmpty()) { // update requested but corresponding import is not found
115
  wp_redirect(remove_query_arg('id', $this->baseUrl)); die();
116
  }
@@ -1454,7 +1454,7 @@ class PMXI_Admin_Import extends PMXI_Controller_Admin {
1454
  if (file_exists($log_file)) unlink($log_file);
1455
  @file_put_contents($log_file, PMXI_Plugin::$session->data['pmxi_import']['log']);
1456
 
1457
- if (!empty(PMXI_Plugin::$session->data['pmxi_import'])) do_action( 'pmxi_after_xml_import', $import->id );
1458
 
1459
  wp_cache_flush();
1460
  foreach ( get_taxonomies() as $tax ) {
110
 
111
  $this->data['reimported_import'] = $import = new PMXI_Import_Record();
112
  $this->data['id'] = $id = $this->input->get('id');
113
+ $this->data['parent_import'] = $parent_import = $this->input->get('parent_import', 0);
114
  if ($id and $import->getById($id)->isEmpty()) { // update requested but corresponding import is not found
115
  wp_redirect(remove_query_arg('id', $this->baseUrl)); die();
116
  }
1454
  if (file_exists($log_file)) unlink($log_file);
1455
  @file_put_contents($log_file, PMXI_Plugin::$session->data['pmxi_import']['log']);
1456
 
1457
+ if ( ! empty(PMXI_Plugin::$session->data['pmxi_import']) ) do_action( 'pmxi_after_xml_import', $import->id );
1458
 
1459
  wp_cache_flush();
1460
  foreach ( get_taxonomies() as $tax ) {
controllers/controller/admin.php CHANGED
@@ -49,7 +49,7 @@ abstract class PMXI_Controller_Admin extends PMXI_Controller {
49
  $wp_styles->add_data('pmxi-admin-style-ie', 'conditional', 'lte IE 7');
50
  wp_enqueue_style('wp-pointer');
51
 
52
- if ( version_compare(get_bloginfo('version'), '3.8-RC1') >= 0 ){
53
  wp_enqueue_style('pmxi-admin-style-wp-3.8', PMXI_ROOT_URL . '/static/css/admin-wp-3.8.css');
54
  }
55
 
49
  $wp_styles->add_data('pmxi-admin-style-ie', 'conditional', 'lte IE 7');
50
  wp_enqueue_style('wp-pointer');
51
 
52
+ if ( version_compare(get_bloginfo('version'), '3.8-RC1') >= 0 ){
53
  wp_enqueue_style('pmxi-admin-style-wp-3.8', PMXI_ROOT_URL . '/static/css/admin-wp-3.8.css');
54
  }
55
 
models/import/record.php CHANGED
@@ -345,7 +345,7 @@ class PMXI_Import_Record extends PMXI_Model_Record {
345
  }
346
  }
347
  }; endif;
348
- // [/custom taxonomies]
349
 
350
  // serialized featured images
351
  if ( ! (($uploads = wp_upload_dir()) && false === $uploads['error'])) {
@@ -593,7 +593,7 @@ class PMXI_Import_Record extends PMXI_Model_Record {
593
 
594
  }
595
 
596
- foreach ($titles as $i => $void) {
597
 
598
  wp_cache_flush();
599
 
@@ -611,7 +611,7 @@ class PMXI_Import_Record extends PMXI_Model_Record {
611
  pmxi_session_commit();
612
  continue;
613
  }
614
- }
615
 
616
  $articleData = array(
617
  'post_type' => $post_type,
@@ -688,10 +688,11 @@ class PMXI_Import_Record extends PMXI_Model_Record {
688
  pmxi_session_commit();
689
  continue;
690
  }
691
- }
692
-
693
  // Duplicate record is founded
694
  if ($post_to_update){
 
695
  // Do not update already existing records option selected
696
  if ("yes" == $this->options['is_keep_former_posts']) {
697
 
@@ -953,7 +954,7 @@ class PMXI_Import_Record extends PMXI_Model_Record {
953
  }
954
 
955
  }
956
- }
957
 
958
  }
959
  // [/custom fields]
@@ -981,7 +982,7 @@ class PMXI_Import_Record extends PMXI_Model_Record {
981
  if ('post' != $articleData['post_type'] and !empty($this->options['page_template'])) update_post_meta($pid, '_wp_page_template', $this->options['page_template']);
982
 
983
  // [featured image]
984
- if ( $articleData['post_type'] == 'product' and class_exists('PMWI_Plugin') and ! empty($uploads) and false === $uploads['error'] and !empty($featured_images[$i]) and (empty($articleData['ID']) or $this->options['update_all_data'] == "yes" or ( $this->options['update_all_data'] == "no" and $this->options['is_update_images']))) {
985
 
986
  require_once(ABSPATH . 'wp-admin/includes/image.php');
987
 
@@ -1040,6 +1041,7 @@ class PMXI_Import_Record extends PMXI_Model_Record {
1040
 
1041
  // keep existing and add newest images
1042
  if ( ! empty($articleData['ID']) and $this->options['is_update_images'] and $this->options['update_images_logic'] == "add_new" and $this->options['update_all_data'] == "no"){
 
1043
  $attachment_imgs = get_posts( array(
1044
  'post_type' => 'attachment',
1045
  'posts_per_page' => -1,
@@ -1060,26 +1062,43 @@ class PMXI_Import_Record extends PMXI_Model_Record {
1060
  }
1061
  }
1062
  }
 
1063
  }
1064
 
1065
  if ($download_image){
1066
 
1067
  // do not download images
1068
- if ( ! $this->options['download_images'] ){
1069
-
1070
  $image_filename = $image_name;
1071
- $image_filepath = $uploads['path'] . '/' . url_title( $image_filename );
1072
 
1073
- if ( @file_exists($image_filepath) ){
1074
- $download_image = false;
1075
- if( ! ($image_info = @getimagesize($image_filepath)) or ! in_array($image_info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG))) {
1076
- $logger and call_user_func($logger, sprintf(__('<b>WARNING</b>: File %s is not a valid image and cannot be set as featured one', 'pmxi_plugin'), $image_filepath));
1077
- $logger and PMXI_Plugin::$session['pmxi_import']['warnings'] = ++PMXI_Plugin::$session->data['pmxi_import']['warnings'];
1078
- @unlink($image_filepath);
1079
- } else {
1080
- $create_image = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1081
  }
1082
- }
1083
  }
1084
 
1085
  if ($download_image){
@@ -1088,12 +1107,12 @@ class PMXI_Import_Record extends PMXI_Model_Record {
1088
  @unlink($image_filepath); // delete file since failed upload may result in empty file created
1089
  } elseif( ($image_info = @getimagesize($image_filepath)) and in_array($image_info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG))) {
1090
  $create_image = true;
1091
- }
1092
 
1093
  if ( ! $create_image ){
1094
 
1095
  $url = str_replace(" ", "%20", trim($img_url));
1096
-
1097
  if ( ! get_file_curl($url, $image_filepath) and ! @file_put_contents($image_filepath, @file_get_contents($url))) {
1098
  $logger and call_user_func($logger, sprintf(__('<b>WARNING</b>: File %s cannot be saved locally as %s', 'pmxi_plugin'), $url, $image_filepath));
1099
  $logger and PMXI_Plugin::$session['pmxi_import']['warnings'] = ++PMXI_Plugin::$session->data['pmxi_import']['warnings'];
@@ -1219,7 +1238,7 @@ class PMXI_Import_Record extends PMXI_Model_Record {
1219
  // [/attachments]
1220
 
1221
  // [custom taxonomies]
1222
- if ($articleData['post_type'] == 'product' and class_exists('PMWI_Plugin') and !empty($taxonomies)){
1223
 
1224
  foreach ($taxonomies as $tx_name => $txes) {
1225
 
@@ -1388,7 +1407,21 @@ class PMXI_Import_Record extends PMXI_Model_Record {
1388
  $logger and call_user_func($logger, sprintf(__('`%s` post created successfully', 'pmxi_plugin'), $articleData['post_title']));
1389
  } else {
1390
  $logger and call_user_func($logger, sprintf(__('`%s` post updated successfully', 'pmxi_plugin'), $articleData['post_title']));
1391
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1392
 
1393
  do_action( 'pmxi_saved_post', $pid); // hook that was triggered immediately after post saved
1394
 
@@ -1477,9 +1510,9 @@ class PMXI_Import_Record extends PMXI_Model_Record {
1477
 
1478
  $this->wpdb->query(
1479
  $this->wpdb->prepare($sql, '')
1480
- );
1481
 
1482
- do_action('pmxi_delete_post', $missing_ids);
1483
  }
1484
 
1485
  }
@@ -1576,7 +1609,10 @@ class PMXI_Import_Record extends PMXI_Model_Record {
1576
  }
1577
  if (!empty($ids)){
1578
 
1579
- foreach ($ids as $id) wp_delete_object_term_relationships($id, get_object_taxonomies('' != $this->options['custom_type'] ? $this->options['custom_type'] : 'post'));
 
 
 
1580
 
1581
  $sql = "delete a,b,c
1582
  FROM ".$this->wpdb->posts." a
@@ -1604,6 +1640,7 @@ class PMXI_Import_Record extends PMXI_Model_Record {
1604
  public function deleteFiles() {
1605
  $fileList = new PMXI_File_List();
1606
  foreach($fileList->getBy('import_id', $this->id)->convertRecords() as $f) {
 
1607
  $f->delete();
1608
  }
1609
  return $this;
345
  }
346
  }
347
  }; endif;
348
+ // [/custom taxonomies]
349
 
350
  // serialized featured images
351
  if ( ! (($uploads = wp_upload_dir()) && false === $uploads['error'])) {
593
 
594
  }
595
 
596
+ foreach ($titles as $i => $void) {
597
 
598
  wp_cache_flush();
599
 
611
  pmxi_session_commit();
612
  continue;
613
  }
614
+ }
615
 
616
  $articleData = array(
617
  'post_type' => $post_type,
688
  pmxi_session_commit();
689
  continue;
690
  }
691
+ }
692
+
693
  // Duplicate record is founded
694
  if ($post_to_update){
695
+
696
  // Do not update already existing records option selected
697
  if ("yes" == $this->options['is_keep_former_posts']) {
698
 
954
  }
955
 
956
  }
957
+ }
958
 
959
  }
960
  // [/custom fields]
982
  if ('post' != $articleData['post_type'] and !empty($this->options['page_template'])) update_post_meta($pid, '_wp_page_template', $this->options['page_template']);
983
 
984
  // [featured image]
985
+ if ( ! empty($uploads) and false === $uploads['error'] and !empty($featured_images[$i]) and (empty($articleData['ID']) or $this->options['update_all_data'] == "yes" or ( $this->options['update_all_data'] == "no" and $this->options['is_update_images']))) {
986
 
987
  require_once(ABSPATH . 'wp-admin/includes/image.php');
988
 
1041
 
1042
  // keep existing and add newest images
1043
  if ( ! empty($articleData['ID']) and $this->options['is_update_images'] and $this->options['update_images_logic'] == "add_new" and $this->options['update_all_data'] == "no"){
1044
+
1045
  $attachment_imgs = get_posts( array(
1046
  'post_type' => 'attachment',
1047
  'posts_per_page' => -1,
1062
  }
1063
  }
1064
  }
1065
+
1066
  }
1067
 
1068
  if ($download_image){
1069
 
1070
  // do not download images
1071
+ if ( ! $this->options['download_images'] ){
1072
+
1073
  $image_filename = $image_name;
1074
+ $image_filepath = $uploads['path'] . '/' . url_title( $image_filename );
1075
 
1076
+ $existing_attachment = $this->wpdb->get_row( $this->wpdb->prepare( "SELECT * FROM " . $this->wpdb->prefix ."posts WHERE guid = '%s'", $image_filepath ) );
1077
+
1078
+ if ( ! empty($existing_attachment->ID) ){
1079
+
1080
+ $download_image = false;
1081
+ $create_image = false;
1082
+
1083
+ if ( ! has_post_thumbnail($pid) )
1084
+ set_post_thumbnail($pid, $existing_attachment->ID);
1085
+ else
1086
+ $gallery_attachment_ids[] = $existing_attachment->ID;
1087
+
1088
+ }
1089
+ else{
1090
+
1091
+ if ( @file_exists($image_filepath) ){
1092
+ $download_image = false;
1093
+ if( ! ($image_info = @getimagesize($image_filepath)) or ! in_array($image_info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG))) {
1094
+ $logger and call_user_func($logger, sprintf(__('<b>WARNING</b>: File %s is not a valid image and cannot be set as featured one', 'pmxi_plugin'), $image_filepath));
1095
+ $logger and PMXI_Plugin::$session['pmxi_import']['warnings'] = ++PMXI_Plugin::$session->data['pmxi_import']['warnings'];
1096
+ @unlink($image_filepath);
1097
+ } else {
1098
+ $create_image = true;
1099
+ }
1100
  }
1101
+ }
1102
  }
1103
 
1104
  if ($download_image){
1107
  @unlink($image_filepath); // delete file since failed upload may result in empty file created
1108
  } elseif( ($image_info = @getimagesize($image_filepath)) and in_array($image_info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG))) {
1109
  $create_image = true;
1110
+ }
1111
 
1112
  if ( ! $create_image ){
1113
 
1114
  $url = str_replace(" ", "%20", trim($img_url));
1115
+
1116
  if ( ! get_file_curl($url, $image_filepath) and ! @file_put_contents($image_filepath, @file_get_contents($url))) {
1117
  $logger and call_user_func($logger, sprintf(__('<b>WARNING</b>: File %s cannot be saved locally as %s', 'pmxi_plugin'), $url, $image_filepath));
1118
  $logger and PMXI_Plugin::$session['pmxi_import']['warnings'] = ++PMXI_Plugin::$session->data['pmxi_import']['warnings'];
1238
  // [/attachments]
1239
 
1240
  // [custom taxonomies]
1241
+ if (!empty($taxonomies)){
1242
 
1243
  foreach ($taxonomies as $tx_name => $txes) {
1244
 
1407
  $logger and call_user_func($logger, sprintf(__('`%s` post created successfully', 'pmxi_plugin'), $articleData['post_title']));
1408
  } else {
1409
  $logger and call_user_func($logger, sprintf(__('`%s` post updated successfully', 'pmxi_plugin'), $articleData['post_title']));
1410
+ }
1411
+
1412
+ // [addons import]
1413
+
1414
+ // prepare data for import
1415
+ $importData = array(
1416
+ 'pid' => $pid,
1417
+ 'import' => $this,
1418
+ 'logger' => $logger
1419
+ );
1420
+
1421
+ // deligate operation to addons
1422
+ foreach (PMXI_Admin_Addons::get_active_addons() as $class) if ( method_exists($addons[$class], 'saved_post') ) $addons[$class]->saved_post($importData);
1423
+
1424
+ // [/addons import]
1425
 
1426
  do_action( 'pmxi_saved_post', $pid); // hook that was triggered immediately after post saved
1427
 
1510
 
1511
  $this->wpdb->query(
1512
  $this->wpdb->prepare($sql, '')
1513
+ );
1514
 
1515
+ do_action('pmxi_delete_post', $missing_ids);
1516
  }
1517
 
1518
  }
1609
  }
1610
  if (!empty($ids)){
1611
 
1612
+ foreach ($ids as $id) {
1613
+ do_action('pmxi_delete_post', $id);
1614
+ wp_delete_object_term_relationships($id, get_object_taxonomies('' != $this->options['custom_type'] ? $this->options['custom_type'] : 'post'));
1615
+ }
1616
 
1617
  $sql = "delete a,b,c
1618
  FROM ".$this->wpdb->posts." a
1640
  public function deleteFiles() {
1641
  $fileList = new PMXI_File_List();
1642
  foreach($fileList->getBy('import_id', $this->id)->convertRecords() as $f) {
1643
+ if ( @file_exists($f->path) ) @unlink($f->path);
1644
  $f->delete();
1645
  }
1646
  return $this;
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP All Import
4
  Plugin URI: http://www.wpallimport.com/upgrade-to-pro?utm_source=wordpress.org&utm_medium=plugins-page&utm_campaign=free+plugin
5
  Description: The most powerful solution for importing XML and CSV files to WordPress. Create Posts and Pages with content from any XML or CSV file. A paid upgrade to WP All Import Pro is available for support and additional features.
6
- Version: 3.1.0
7
  Author: Soflyy
8
  */
9
 
@@ -28,7 +28,7 @@ define('PMXI_ROOT_URL', rtrim(plugin_dir_url(__FILE__), '/'));
28
  */
29
  define('PMXI_PREFIX', 'pmxi_');
30
 
31
- define('PMXI_VERSION', '3.1.0');
32
 
33
  define('PMXI_EDITION', 'free');
34
 
@@ -680,7 +680,7 @@ final class PMXI_Plugin {
680
  'image_meta_description' => '',
681
  'image_meta_description_delim' => '',
682
  'status_xpath' => '',
683
- 'download_images' => 1,
684
  'converted_options' => 0,
685
  'update_all_data' => 'yes',
686
  'is_fast_mode' => 0,
3
  Plugin Name: WP All Import
4
  Plugin URI: http://www.wpallimport.com/upgrade-to-pro?utm_source=wordpress.org&utm_medium=plugins-page&utm_campaign=free+plugin
5
  Description: The most powerful solution for importing XML and CSV files to WordPress. Create Posts and Pages with content from any XML or CSV file. A paid upgrade to WP All Import Pro is available for support and additional features.
6
+ Version: 3.1.1
7
  Author: Soflyy
8
  */
9
 
28
  */
29
  define('PMXI_PREFIX', 'pmxi_');
30
 
31
+ define('PMXI_VERSION', '3.1.1');
32
 
33
  define('PMXI_EDITION', 'free');
34
 
680
  'image_meta_description' => '',
681
  'image_meta_description_delim' => '',
682
  'status_xpath' => '',
683
+ 'download_images' => 0,
684
  'converted_options' => 0,
685
  'update_all_data' => 'yes',
686
  'is_fast_mode' => 0,
readme.txt CHANGED
@@ -43,6 +43,10 @@ Our YouTube channel has many [videos showing WP All Import in action.](http://ww
43
 
44
  Need to [import XML and CSV to WooCommerce?](http://wordpress.org/plugins/woocommerce-xml-csv-product-import/) Check out our WooCommerce add-on.
45
 
 
 
 
 
46
  == Premium Support ==
47
  Upgrade to the professional edition of WP All Import for premium support.
48
 
43
 
44
  Need to [import XML and CSV to WooCommerce?](http://wordpress.org/plugins/woocommerce-xml-csv-product-import/) Check out our WooCommerce add-on.
45
 
46
+ Follow [@WPAllImport](http://twitter.com/WPAllImport) on Twitter.
47
+
48
+
49
+
50
  == Premium Support ==
51
  Upgrade to the professional edition of WP All Import for premium support.
52
 
static/css/admin-wp-3.8.css CHANGED
@@ -10,4 +10,10 @@
10
  }
11
  .pmxi_plugin .submit-buttons .large_button:hover{
12
  vertical-align: baseline !important;
13
- };
 
 
 
 
 
 
10
  }
11
  .pmxi_plugin .submit-buttons .large_button:hover{
12
  vertical-align: baseline !important;
13
+ }
14
+ .pmxi_plugin #titlediv #titlewrap{
15
+ font-size: 13px !important;
16
+ }
17
+ .pmxi_plugin #titlediv #title{
18
+ color: #444 !important;
19
+ }
static/css/admin.css CHANGED
@@ -1355,4 +1355,4 @@ table.xml table {
1355
  }
1356
  .pmxi_plugin .ui-progressbar{
1357
  height: 32px;
1358
- }
1355
  }
1356
  .pmxi_plugin .ui-progressbar{
1357
  height: 32px;
1358
+ }
static/js/admin.js CHANGED
@@ -78,14 +78,14 @@
78
  $('.nav-tab').removeClass('nav-tab-active');
79
  $(this).addClass('nav-tab-active');
80
  $('.pmxi_tab').hide();
81
- $('div#' + $(this).attr('rel')).fadeIn();
82
 
83
  if ( parseInt($('div#' + $(this).attr('rel')).find('.is_disabled').val()) ) {
84
  $('div#' + $(this).attr('rel')).find('input, select, textarea').attr('disabled','disabled');
85
  }
86
- else {
87
- $('div#' + $(this).attr('rel')).find('input, select, textarea').removeAttr('disabled');
88
- }
89
 
90
  });
91
 
78
  $('.nav-tab').removeClass('nav-tab-active');
79
  $(this).addClass('nav-tab-active');
80
  $('.pmxi_tab').hide();
81
+ $('div#' + $(this).attr('rel')).fadeIn();
82
 
83
  if ( parseInt($('div#' + $(this).attr('rel')).find('.is_disabled').val()) ) {
84
  $('div#' + $(this).attr('rel')).find('input, select, textarea').attr('disabled','disabled');
85
  }
86
+ /*else {
87
+ $('div#' + $(this).attr('rel')).find('input, select, textarea').removeAttr('readonly');
88
+ }*/
89
 
90
  });
91
 
static/js/pmxi.js CHANGED
@@ -11,4 +11,22 @@
11
  }, 'html');
12
  });
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  });})(jQuery);
11
  }, 'html');
12
  });
13
 
14
+ $('#dismiss_manage_top').click(function(){
15
+
16
+ $(this).parents('div.updated:first').slideUp();
17
+ $.post('admin.php?page=pmxi-admin-settings&action=dismiss_manage_top', {dismiss: true}, function (data) {
18
+
19
+ }, 'html');
20
+
21
+ });
22
+
23
+ $('#dismiss_manage_bottom').click(function(){
24
+
25
+ $(this).parents('div.updated_bottom:first').slideUp();
26
+ $.post('admin.php?page=pmxi-admin-settings&action=dismiss_manage_bottom', {dismiss: true}, function (data) {
27
+
28
+ }, 'html');
29
+
30
+ });
31
+
32
  });})(jQuery);
views/admin/import/options/_featured_template.php CHANGED
@@ -30,11 +30,11 @@
30
  </div>
31
  <div class="input" style="margin:3px 0px;">
32
  <input type="hidden" name="download_images" value="0" />
33
- <input type="checkbox" id="download_images_<?php echo $entry; ?>" name="download_images" value="1" <?php echo $post['download_images'] ? 'checked="checked"' : '' ?> class="switcher fix_checkbox" <?php if ($post_type != "product" or ! class_exists('PMWI_Plugin')):?>disabled="disabled"<?php endif; ?>/>
34
  <label for="download_images_<?php echo $entry;?>"><?php _e('Download images','pmxi_plugin');?> </label>
35
  <a href="#help" class="help" title="<?php _e('If this option enabled, then plugin will download images into the Uploads folder. If this option disabled, then plugin will search files in Uploads <strong>/wp-content/uploads/'.date("Y/m").'</strong> folder.', 'pmxi_plugin') ?>">?</a>
36
  </div>
37
- <div class="input switcher-target-download_images_<?php echo $entry; ?>" style="margin:3px 0px;">
38
  <input type="hidden" name="auto_rename_images" value="0" />
39
  <input type="checkbox" id="auto_rename_images_<?php echo $entry; ?>" name="auto_rename_images" value="1" <?php echo $post['auto_rename_images'] ? 'checked="checked"' : '' ?> class="switcher fix_checkbox" <?php if ($post_type != "product" or ! class_exists('PMWI_Plugin')):?>disabled="disabled"<?php endif; ?>/>
40
  <label for="auto_rename_images_<?php echo $entry;?>"><?php _e('Instead of using original image file name, set file name(s) to','pmxi_plugin');?> </label>
30
  </div>
31
  <div class="input" style="margin:3px 0px;">
32
  <input type="hidden" name="download_images" value="0" />
33
+ <input type="checkbox" id="download_images_<?php echo $entry; ?>" name="download_images" value="1" <?php echo $post['download_images'] ? 'checked="checked"' : '' ?> class="fix_checkbox" <?php if ($post_type != "product" or ! class_exists('PMWI_Plugin')):?>disabled="disabled"<?php endif; ?>/>
34
  <label for="download_images_<?php echo $entry;?>"><?php _e('Download images','pmxi_plugin');?> </label>
35
  <a href="#help" class="help" title="<?php _e('If this option enabled, then plugin will download images into the Uploads folder. If this option disabled, then plugin will search files in Uploads <strong>/wp-content/uploads/'.date("Y/m").'</strong> folder.', 'pmxi_plugin') ?>">?</a>
36
  </div>
37
+ <div class="input" style="margin:3px 0px;">
38
  <input type="hidden" name="auto_rename_images" value="0" />
39
  <input type="checkbox" id="auto_rename_images_<?php echo $entry; ?>" name="auto_rename_images" value="1" <?php echo $post['auto_rename_images'] ? 'checked="checked"' : '' ?> class="switcher fix_checkbox" <?php if ($post_type != "product" or ! class_exists('PMWI_Plugin')):?>disabled="disabled"<?php endif; ?>/>
40
  <label for="auto_rename_images_<?php echo $entry;?>"><?php _e('Instead of using original image file name, set file name(s) to','pmxi_plugin');?> </label>
views/admin/import/options/_main_options_template.php CHANGED
@@ -1,28 +1,20 @@
1
  <tr>
2
  <td style="border-bottom:1px solid #ccc;" colspan="3">
3
 
4
- <?php if ($post_type != "post"):?>
5
-
6
- <center>
7
 
8
- <?php if ($post_type == "product" and class_exists('PMWI_Plugin')):?>
9
-
10
- <?php if (PMWI_EDITION == 'free'):?>
11
- <h3>Get our WooCommerce add-on to import to Simple, Variable, Grouped, and Affiliate/External products</h3>
12
- <p style='font-size: 1.3em; font-weight: bold;'><a href="http://www.wpallimport.com/upgrade-to-pro?utm_source=wordpress.org&utm_medium=custom-fields&utm_campaign=free+plugin" target="_blank" class="upgrade_link">Upgrade Now</a></p>
13
- <?php endif; ?>
14
 
15
  <input type="hidden" class="is_disabled" value="0"/>
16
 
17
  <?php else: ?>
18
- <h3>Please upgrade to the professional version of WP All Import to import to Custom Post Types.</h3>
19
- <input type="hidden" class="is_disabled" value="1"/>
20
- <p style='font-size: 1.3em; font-weight: bold;'><a href="http://www.wpallimport.com/upgrade-to-pro?utm_source=wordpress.org&utm_medium=custom-fields&utm_campaign=free+plugin" target="_blank" class="upgrade_link">Upgrade Now</a></p>
21
- <?php endif; ?>
22
-
23
- <hr />
24
-
25
- </center>
26
 
27
  <?php else: ?>
28
 
1
  <tr>
2
  <td style="border-bottom:1px solid #ccc;" colspan="3">
3
 
4
+ <?php if ($post_type != "post"):?>
 
 
5
 
6
+ <?php if ($post_type == "product" and class_exists('PMWI_Plugin')):?>
 
 
 
 
 
7
 
8
  <input type="hidden" class="is_disabled" value="0"/>
9
 
10
  <?php else: ?>
11
+ <center>
12
+ <h3>Please upgrade to the professional version of WP All Import to import to Custom Post Types.</h3>
13
+ <input type="hidden" class="is_disabled" value="1"/>
14
+ <p style='font-size: 1.3em; font-weight: bold;'><a href="http://www.wpallimport.com/upgrade-to-pro?utm_source=wordpress.org&utm_medium=custom-fields&utm_campaign=free+plugin" target="_blank" class="upgrade_link">Upgrade Now</a></p>
15
+ <hr />
16
+ </center>
17
+ <?php endif; ?>
 
18
 
19
  <?php else: ?>
20
 
views/admin/settings/index.php CHANGED
@@ -44,8 +44,6 @@
44
  <div><?php printf(__('max_execution_time %s', 'pmxi_plugin'), ini_get('max_execution_time')) ?></div>
45
  <div><?php printf(__('max_input_time %s', 'pmxi_plugin'), ini_get('max_input_time')) ?></div>
46
 
47
- <h3><?php _e('Recurring & Scheduled Imports', 'pmxi_plugin') ?></h3>
48
- <div><?php printf(__('Cron Job Secret Key %s', 'pmxi_plugin'), '<input type="text" name="cron_job_key" value="' . esc_attr($post['cron_job_key']) . '"/>') ?></div>
49
  <h3><?php _e('Import Settings', 'pmxi_plugin') ?></h3>
50
  <p>
51
  <?php printf(__('Create XML chunks, when feed contains more than %s (records)', 'pmxi_plugin'), '<input type="text" name="large_feed_limit" value="' . esc_attr($post['large_feed_limit']) . '"/>') ?></p>
44
  <div><?php printf(__('max_execution_time %s', 'pmxi_plugin'), ini_get('max_execution_time')) ?></div>
45
  <div><?php printf(__('max_input_time %s', 'pmxi_plugin'), ini_get('max_input_time')) ?></div>
46
 
 
 
47
  <h3><?php _e('Import Settings', 'pmxi_plugin') ?></h3>
48
  <p>
49
  <?php printf(__('Create XML chunks, when feed contains more than %s (records)', 'pmxi_plugin'), '<input type="text" name="large_feed_limit" value="' . esc_attr($post['large_feed_limit']) . '"/>') ?></p>