Version Description
- fixed database schema
- uploading large files
Download this release
Release Info
Developer | soflyy |
Plugin | Import any XML or CSV File to WordPress |
Version | 3.2.2 |
Comparing to | |
See all releases |
Code changes from version 3.2.1 to 3.2.2
- classes/chunk.php +13 -7
- controllers/admin/settings.php +1 -1
- plugin.php +11 -22
- readme.txt +20 -27
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- static/js/jquery/jquery.ui-contextmenu.min.js +0 -0
classes/chunk.php
CHANGED
@@ -76,7 +76,7 @@ class PMXI_Chunk {
|
|
76 |
$this->file = $file;
|
77 |
|
78 |
if (empty($this->options['element'])){
|
79 |
-
|
80 |
|
81 |
if (function_exists('stream_filter_register')){
|
82 |
stream_filter_register('preprocessxml', 'preprocessXml_filter');
|
@@ -90,8 +90,12 @@ class PMXI_Chunk {
|
|
90 |
while ( @$reader->read()) {
|
91 |
switch ($reader->nodeType) {
|
92 |
case (XMLREADER::ELEMENT):
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
95 |
break;
|
96 |
default:
|
97 |
|
@@ -100,7 +104,7 @@ class PMXI_Chunk {
|
|
100 |
}
|
101 |
unset($reader);
|
102 |
|
103 |
-
if (!empty($founded_tags)) {
|
104 |
$element_counts = array_count_values($founded_tags);
|
105 |
if (!empty($element_counts)){
|
106 |
foreach ($element_counts as $tag => $count)
|
@@ -109,10 +113,12 @@ class PMXI_Chunk {
|
|
109 |
|
110 |
arsort($element_counts);
|
111 |
}
|
112 |
-
}
|
113 |
|
114 |
if (!empty($this->cloud)){
|
115 |
|
|
|
|
|
116 |
$main_elements = array('node', 'product', 'job', 'deal', 'entry', 'item', 'property', 'listing', 'hotel', 'record', 'article', 'post', 'book');
|
117 |
|
118 |
foreach ($this->cloud as $element_name => $value) {
|
@@ -122,11 +128,11 @@ class PMXI_Chunk {
|
|
122 |
}
|
123 |
}
|
124 |
if (empty($this->options['element'])){
|
125 |
-
foreach ($
|
126 |
$this->options['element'] = $el;
|
127 |
break;
|
128 |
}
|
129 |
-
}
|
130 |
}
|
131 |
}
|
132 |
|
76 |
$this->file = $file;
|
77 |
|
78 |
if (empty($this->options['element'])){
|
79 |
+
//$founded_tags = array();
|
80 |
|
81 |
if (function_exists('stream_filter_register')){
|
82 |
stream_filter_register('preprocessxml', 'preprocessXml_filter');
|
90 |
while ( @$reader->read()) {
|
91 |
switch ($reader->nodeType) {
|
92 |
case (XMLREADER::ELEMENT):
|
93 |
+
if (array_key_exists(str_replace(":", "_", $reader->localName), $this->cloud))
|
94 |
+
$this->cloud[str_replace(":", "_", $reader->localName)]++;
|
95 |
+
else
|
96 |
+
$this->cloud[str_replace(":", "_", $reader->localName)] = 1;
|
97 |
+
//array_push($founded_tags, str_replace(":", "_", $reader->localName));
|
98 |
+
|
99 |
break;
|
100 |
default:
|
101 |
|
104 |
}
|
105 |
unset($reader);
|
106 |
|
107 |
+
/*if (!empty($founded_tags)) {
|
108 |
$element_counts = array_count_values($founded_tags);
|
109 |
if (!empty($element_counts)){
|
110 |
foreach ($element_counts as $tag => $count)
|
113 |
|
114 |
arsort($element_counts);
|
115 |
}
|
116 |
+
} */
|
117 |
|
118 |
if (!empty($this->cloud)){
|
119 |
|
120 |
+
arsort($this->cloud);
|
121 |
+
|
122 |
$main_elements = array('node', 'product', 'job', 'deal', 'entry', 'item', 'property', 'listing', 'hotel', 'record', 'article', 'post', 'book');
|
123 |
|
124 |
foreach ($this->cloud as $element_name => $value) {
|
128 |
}
|
129 |
}
|
130 |
if (empty($this->options['element'])){
|
131 |
+
foreach ($this->cloud as $el => $count) {
|
132 |
$this->options['element'] = $el;
|
133 |
break;
|
134 |
}
|
135 |
+
}
|
136 |
}
|
137 |
}
|
138 |
|
controllers/admin/settings.php
CHANGED
@@ -438,7 +438,7 @@ class PMXI_Admin_Settings extends PMXI_Controller_Admin {
|
|
438 |
}
|
439 |
|
440 |
// Return JSON-RPC response
|
441 |
-
|
442 |
|
443 |
}
|
444 |
|
438 |
}
|
439 |
|
440 |
// Return JSON-RPC response
|
441 |
+
exit(json_encode(array("jsonrpc" => "2.0", "error" => null, "result" => null, "id" => "id", "name" => $filePath)));
|
442 |
|
443 |
}
|
444 |
|
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.2.
|
7 |
Author: Soflyy
|
8 |
*/
|
9 |
|
@@ -25,7 +25,7 @@ define('PMXI_ROOT_URL', rtrim(plugin_dir_url(__FILE__), '/'));
|
|
25 |
*/
|
26 |
define('PMXI_PREFIX', 'pmxi_');
|
27 |
|
28 |
-
define('PMXI_VERSION', '3.2.
|
29 |
|
30 |
define('PMXI_EDITION', 'free');
|
31 |
|
@@ -315,6 +315,8 @@ final class PMXI_Plugin {
|
|
315 |
}
|
316 |
|
317 |
}
|
|
|
|
|
318 |
|
319 |
}
|
320 |
else {
|
@@ -322,12 +324,9 @@ final class PMXI_Plugin {
|
|
322 |
// migration fixes for vesions
|
323 |
switch ($is_migrated) {
|
324 |
|
325 |
-
case '3.2.0
|
326 |
-
# code..
|
327 |
-
break;
|
328 |
-
|
329 |
case '3.2.1':
|
330 |
-
|
331 |
break;
|
332 |
|
333 |
default:
|
@@ -622,11 +621,7 @@ final class PMXI_Plugin {
|
|
622 |
}
|
623 |
}
|
624 |
|
625 |
-
dbDelta($plugin_queries);
|
626 |
-
|
627 |
-
$this->__ver_1_04_transition_fix();
|
628 |
-
|
629 |
-
$this->__add_feed_type_fix(); // feature to version 2.22
|
630 |
|
631 |
// sync data between plugin tables and wordpress (mostly for the case when plugin is reactivated)
|
632 |
|
@@ -647,13 +642,10 @@ final class PMXI_Plugin {
|
|
647 |
$locale = apply_filters( 'plugin_locale', get_locale(), 'pmxi_plugin' );
|
648 |
|
649 |
load_plugin_textdomain( 'pmxi_plugin', false, dirname( plugin_basename( __FILE__ ) ) . "/i18n/languages" );
|
650 |
-
}
|
|
|
|
|
651 |
|
652 |
-
/**
|
653 |
-
* Method perfoms transition from version when file uploads has been stored in dabase to the solution when it stored on disk
|
654 |
-
* NOTE: the function can be removed when plugin version progress and it's sure matter nobody has ver 1.03
|
655 |
-
*/
|
656 |
-
public function __ver_1_04_transition_fix() {
|
657 |
$uploads = wp_upload_dir();
|
658 |
|
659 |
if ( ! is_dir($uploads['basedir'] . '/wpallimport/logs') or ! is_writable($uploads['basedir'] . '/wpallimport/logs')) {
|
@@ -681,12 +673,9 @@ final class PMXI_Plugin {
|
|
681 |
break;
|
682 |
}
|
683 |
}
|
684 |
-
}
|
685 |
-
|
686 |
-
public function __add_feed_type_fix(){
|
687 |
|
688 |
$table = $this->getTablePrefix() . 'imports';
|
689 |
-
|
690 |
$tablefields = $wpdb->get_results("DESCRIBE {$table};");
|
691 |
$parent_import_id = false;
|
692 |
$iteration = false;
|
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.2.2
|
7 |
Author: Soflyy
|
8 |
*/
|
9 |
|
25 |
*/
|
26 |
define('PMXI_PREFIX', 'pmxi_');
|
27 |
|
28 |
+
define('PMXI_VERSION', '3.2.2');
|
29 |
|
30 |
define('PMXI_EDITION', 'free');
|
31 |
|
315 |
}
|
316 |
|
317 |
}
|
318 |
+
|
319 |
+
$this->__fix_db_schema(); // feature to version 3.2.0
|
320 |
|
321 |
}
|
322 |
else {
|
324 |
// migration fixes for vesions
|
325 |
switch ($is_migrated) {
|
326 |
|
327 |
+
case '3.2.0':
|
|
|
|
|
|
|
328 |
case '3.2.1':
|
329 |
+
$this->__fix_db_schema(); // feature to version 3.2.0
|
330 |
break;
|
331 |
|
332 |
default:
|
621 |
}
|
622 |
}
|
623 |
|
624 |
+
dbDelta($plugin_queries);
|
|
|
|
|
|
|
|
|
625 |
|
626 |
// sync data between plugin tables and wordpress (mostly for the case when plugin is reactivated)
|
627 |
|
642 |
$locale = apply_filters( 'plugin_locale', get_locale(), 'pmxi_plugin' );
|
643 |
|
644 |
load_plugin_textdomain( 'pmxi_plugin', false, dirname( plugin_basename( __FILE__ ) ) . "/i18n/languages" );
|
645 |
+
}
|
646 |
+
|
647 |
+
public function __fix_db_schema(){
|
648 |
|
|
|
|
|
|
|
|
|
|
|
649 |
$uploads = wp_upload_dir();
|
650 |
|
651 |
if ( ! is_dir($uploads['basedir'] . '/wpallimport/logs') or ! is_writable($uploads['basedir'] . '/wpallimport/logs')) {
|
673 |
break;
|
674 |
}
|
675 |
}
|
|
|
|
|
|
|
676 |
|
677 |
$table = $this->getTablePrefix() . 'imports';
|
678 |
+
|
679 |
$tablefields = $wpdb->get_results("DESCRIBE {$table};");
|
680 |
$parent_import_id = false;
|
681 |
$iteration = false;
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Import any XML or CSV File to WordPress ===
|
2 |
Contributors: soflyy
|
3 |
-
Tags: wordpress, xml, csv, datafeed, import
|
4 |
Requires at least: 3.6.1
|
5 |
-
Tested up to: 4.0
|
6 |
-
Stable tag: 3.2.
|
|
|
7 |
|
8 |
WP All Import is an extremely powerful plugin that makes it easy to import any XML or CSV file to WordPress.
|
9 |
|
@@ -18,28 +18,28 @@ There are no special requirements that the elements in your file must be laid ou
|
|
18 |
|
19 |
WP All Import can be used for everything from migrating content from a legacy CMS to WordPress to building a store with an affiliate datafeed to displaying live stock quotes or sports scores to building a real estate portal.
|
20 |
|
21 |
-
|
|
|
|
|
22 |
|
23 |
= WP All Import Professional Edition =
|
24 |
-
[youtube http://www.youtube.com/watch?v=
|
25 |
|
26 |
*WP All Import Pro* is a paid upgrade that includes premium support and adds the following features:
|
27 |
|
28 |
-
* Import to Custom Post Types - commonly used to import to Automotiv, OpenHouse, Listings, as well as any other theme or plugin that makes use of Custom Post Types.
|
29 |
-
|
30 |
-
* Cron Job/Recurring Imports - WP All Import pro can check periodically check a file for updates, and add, edit, and delete to the imported posts accordingly.
|
31 |
-
|
32 |
* Import data to Custom Fields - used by many themes, especially those using Custom Post Types - to store data associated with the posts.
|
33 |
|
34 |
* Import images to the post media gallery - WP All Import can download images from URLs in an XML or CSV file and put them in the media gallery.
|
35 |
|
|
|
|
|
36 |
* Import files from a URL - Download and import files from external websites, even if they are password protected with HTTP authentication. URL imports are integrated with the recurring/cron imports feature, so WP All Import can periodically re-download the files and add, edit, and delete posts accordingly.
|
37 |
|
38 |
* Execution of Custom PHP Functions on data, i.e. use something like [my_function({xpath/to/a/field[1]})] in your template, to pass the value of {xpath/to/a/field[1]} to my_function and display whatever it returns.
|
39 |
|
40 |
-
*
|
41 |
|
42 |
-
[Upgrade to the professional edition of WP All Import.](http://www.wpallimport.com/
|
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 |
|
@@ -52,25 +52,14 @@ E-mail: support@wpallimport.com
|
|
52 |
|
53 |
Need to [import XML and CSV to WooCommerce?](http://wordpress.org/plugins/woocommerce-xml-csv-product-import/) Check out our WooCommerce add-on.
|
54 |
|
55 |
-
[WooCommerce XML & CSV Import Pro Version](http://www.wpallimport.com/woocommerce-product-import)
|
56 |
-
|
57 |
-
|
58 |
-
== Installation ==
|
59 |
-
|
60 |
-
Either: -
|
61 |
-
|
62 |
-
* Upload the plugin from the Plugins page in WordPress
|
63 |
-
* Unzip wp-all-import.zip and upload the contents to /wp-content/plugins/, and then activate the plugin from the Plugins page in WordPress
|
64 |
-
|
65 |
-
Still need help? Read this excellent article: http://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/
|
66 |
-
|
67 |
|
68 |
== Frequently Asked Questions ==
|
69 |
|
70 |
**What Size Files Can WP All Import Handle?**
|
71 |
It depends on your hosting provider’s settings. We’ve imported files of 200Mb and up, even on shared hosts. WP All Import splits your file into manageable chunks.
|
72 |
|
73 |
-
Various settings are available to make it possible to import larger files or speed up your import
|
74 |
|
75 |
*The answer to all of the following questions is yes:*
|
76 |
|
@@ -81,17 +70,21 @@ Does it work with special character encoding like Hebrew, Arabic, Chinese, etc?
|
|
81 |
== Screenshots ==
|
82 |
|
83 |
1. Choose file.
|
84 |
-
2.
|
85 |
-
3.
|
86 |
4. Manage imports.
|
87 |
|
88 |
== Changelog ==
|
89 |
|
|
|
|
|
|
|
|
|
90 |
= 3.2.1 =
|
91 |
* fixed updating import settings
|
92 |
|
93 |
= 3.2.0 =
|
94 |
-
* IMPORTANT: WP All Import v4 (3.2.0) is a MAJOR update. Read this post before upgrading:
|
95 |
* speed up the import of taxonomies/categories
|
96 |
* added taxonomies/categories mapping feature
|
97 |
* added custom fields auto-detection feature
|
1 |
=== Import any XML or CSV File to WordPress ===
|
2 |
Contributors: soflyy
|
|
|
3 |
Requires at least: 3.6.1
|
4 |
+
Tested up to: 4.0.1
|
5 |
+
Stable tag: 3.2.2
|
6 |
+
Tags: wordpress csv import, wordpress xml import, xml, csv, datafeed, import, migrate, import csv to wordpress, import xml to wordpress, advanced xml import, advanced csv import, bulk csv import, bulk xml import, bulk data import, xml to custom post type, csv to custom post type, woocommerce csv import, woocommerce xml import, csv import, import csv, xml import, import xml
|
7 |
|
8 |
WP All Import is an extremely powerful plugin that makes it easy to import any XML or CSV file to WordPress.
|
9 |
|
18 |
|
19 |
WP All Import can be used for everything from migrating content from a legacy CMS to WordPress to building a store with an affiliate datafeed to displaying live stock quotes or sports scores to building a real estate portal.
|
20 |
|
21 |
+
Check out our [documentation and video tutorials](http://www.wpallimport.com/documentation/?utm_source=free-plugin&utm_medium=dot-org&utm_campaign=docs) to make the most of WP All Import.
|
22 |
+
|
23 |
+
For technical support from the developers, please consider purchasing WP All Import Pro.
|
24 |
|
25 |
= WP All Import Professional Edition =
|
26 |
+
[youtube http://www.youtube.com/watch?v=pD6WQANJcJY /]
|
27 |
|
28 |
*WP All Import Pro* is a paid upgrade that includes premium support and adds the following features:
|
29 |
|
|
|
|
|
|
|
|
|
30 |
* Import data to Custom Fields - used by many themes, especially those using Custom Post Types - to store data associated with the posts.
|
31 |
|
32 |
* Import images to the post media gallery - WP All Import can download images from URLs in an XML or CSV file and put them in the media gallery.
|
33 |
|
34 |
+
* Cron Job/Recurring Imports - WP All Import pro can check periodically check a file for updates, and add, edit, and delete to the imported posts accordingly.
|
35 |
+
|
36 |
* Import files from a URL - Download and import files from external websites, even if they are password protected with HTTP authentication. URL imports are integrated with the recurring/cron imports feature, so WP All Import can periodically re-download the files and add, edit, and delete posts accordingly.
|
37 |
|
38 |
* Execution of Custom PHP Functions on data, i.e. use something like [my_function({xpath/to/a/field[1]})] in your template, to pass the value of {xpath/to/a/field[1]} to my_function and display whatever it returns.
|
39 |
|
40 |
+
* Guaranteed technical support via e-mail.
|
41 |
|
42 |
+
[Upgrade to the professional edition of WP All Import.](http://www.wpallimport.com/documentation/?utm_source=free-plugin&utm_medium=dot-org&utm_campaign=upgrade)
|
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 |
|
52 |
|
53 |
Need to [import XML and CSV to WooCommerce?](http://wordpress.org/plugins/woocommerce-xml-csv-product-import/) Check out our WooCommerce add-on.
|
54 |
|
55 |
+
[WooCommerce XML & CSV Import Pro Version](http://www.wpallimport.com/woocommerce-product-import?utm_source=free-plugin&utm_medium=dot-org&utm_campaign=woocommerce)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
== Frequently Asked Questions ==
|
58 |
|
59 |
**What Size Files Can WP All Import Handle?**
|
60 |
It depends on your hosting provider’s settings. We’ve imported files of 200Mb and up, even on shared hosts. WP All Import splits your file into manageable chunks.
|
61 |
|
62 |
+
[Various settings are available](http://www.wpallimport.com/documentation/advanced/import-processing/?utm_source=free-plugin&utm_medium=dot-org&utm_campaign=large-files) to make it possible to import larger files or speed up your import.
|
63 |
|
64 |
*The answer to all of the following questions is yes:*
|
65 |
|
70 |
== Screenshots ==
|
71 |
|
72 |
1. Choose file.
|
73 |
+
2. Filtering options.
|
74 |
+
3. Choose where to import your data.
|
75 |
4. Manage imports.
|
76 |
|
77 |
== Changelog ==
|
78 |
|
79 |
+
= 3.2.2 =
|
80 |
+
* fixed database schema
|
81 |
+
* uploading large files
|
82 |
+
|
83 |
= 3.2.1 =
|
84 |
* fixed updating import settings
|
85 |
|
86 |
= 3.2.0 =
|
87 |
+
* IMPORTANT: WP All Import v4 (3.2.0) is a MAJOR update. Read this post before upgrading: http://www.wpallimport.com/2014/11/free-version-wordpress-org-update-information
|
88 |
* speed up the import of taxonomies/categories
|
89 |
* added taxonomies/categories mapping feature
|
90 |
* added custom fields auto-detection feature
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
static/js/jquery/jquery.ui-contextmenu.min.js
CHANGED
File without changes
|