Version Description
- bug fix: import using stream reader
- bug fix: generation temporary files in system temporary folder
Download this release
Release Info
Developer | soflyy |
Plugin | Import any XML or CSV File to WordPress |
Version | 3.4.9 |
Comparing to | |
See all releases |
Code changes from version 3.4.8 to 3.4.9
- classes/chunk.php +7 -1
- libraries/XmlImportTemplateCodeGenerator.php +11 -4
- plugin.php +2 -2
- readme.txt +5 -1
classes/chunk.php
CHANGED
@@ -171,7 +171,13 @@ class PMXI_Chunk {
|
|
171 |
);
|
172 |
// Works like an XmlReader, and walks the XML tree node by node. Captures by node depth setting.
|
173 |
$parser = new Parser\StringWalker($parseroptions);
|
174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
$this->cloud = $parser->cloud;
|
176 |
|
177 |
}
|
171 |
);
|
172 |
// Works like an XmlReader, and walks the XML tree node by node. Captures by node depth setting.
|
173 |
$parser = new Parser\StringWalker($parseroptions);
|
174 |
+
// Create the streamer
|
175 |
+
$streamer = new XmlStringStreamer($parser, $streamProvider);
|
176 |
+
while ($node = $streamer->getNode()) {
|
177 |
+
// $simpleXmlNode = simplexml_load_string($node);
|
178 |
+
// echo (string)$simpleXmlNode->firstName;
|
179 |
+
}
|
180 |
+
|
181 |
$this->cloud = $parser->cloud;
|
182 |
|
183 |
}
|
libraries/XmlImportTemplateCodeGenerator.php
CHANGED
@@ -98,15 +98,22 @@ class XmlImportTemplateCodeGenerator
|
|
98 |
if (count($this->sequence->getVariables()))
|
99 |
{
|
100 |
array_pop($this->xmlStack);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
if ( ! $filename or ! @is_writable($filename) ){
|
103 |
$uploads = wp_upload_dir();
|
104 |
$targetDir = $uploads['basedir'] . DIRECTORY_SEPARATOR . PMXI_Plugin::TEMP_DIRECTORY;
|
105 |
-
$filename = $targetDir . DIRECTORY_SEPARATOR . wp_unique_filename($targetDir, '
|
106 |
}
|
107 |
-
|
108 |
-
// $filename = @tempnam(XmlImportConfig::getInstance()->getCacheDirectory(), 'xim');
|
109 |
-
// }
|
110 |
file_put_contents($filename, $result);
|
111 |
$sleep = apply_filters( 'wp_all_import_shard_delay', 0 );
|
112 |
usleep($sleep);
|
98 |
if (count($this->sequence->getVariables()))
|
99 |
{
|
100 |
array_pop($this->xmlStack);
|
101 |
+
}
|
102 |
+
// grab import ID for manual and cron import runs
|
103 |
+
$input = new PMXI_Input();
|
104 |
+
$import_id = $input->get('id');
|
105 |
+
if (empty($import_id)){
|
106 |
+
$import_id = $input->get('import_id');
|
107 |
+
}
|
108 |
+
if ( ! $filename or ! @is_writable($filename)) {
|
109 |
+
$filename = @tempnam(XmlImportConfig::getInstance()->getCacheDirectory(), 'xim_id_'. $import_id);
|
110 |
}
|
111 |
if ( ! $filename or ! @is_writable($filename) ){
|
112 |
$uploads = wp_upload_dir();
|
113 |
$targetDir = $uploads['basedir'] . DIRECTORY_SEPARATOR . PMXI_Plugin::TEMP_DIRECTORY;
|
114 |
+
$filename = $targetDir . DIRECTORY_SEPARATOR . wp_unique_filename($targetDir, 'tmpfile_id_'. $import_id);
|
115 |
}
|
116 |
+
|
|
|
|
|
117 |
file_put_contents($filename, $result);
|
118 |
$sleep = apply_filters( 'wp_all_import_shard_delay', 0 );
|
119 |
usleep($sleep);
|
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.4.
|
7 |
Author: Soflyy
|
8 |
*/
|
9 |
|
@@ -25,7 +25,7 @@ define('WP_ALL_IMPORT_ROOT_URL', rtrim(plugin_dir_url(__FILE__), '/'));
|
|
25 |
*/
|
26 |
define('WP_ALL_IMPORT_PREFIX', 'pmxi_');
|
27 |
|
28 |
-
define('PMXI_VERSION', '3.4.
|
29 |
|
30 |
define('PMXI_EDITION', 'free');
|
31 |
|
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.4.9
|
7 |
Author: Soflyy
|
8 |
*/
|
9 |
|
25 |
*/
|
26 |
define('WP_ALL_IMPORT_PREFIX', 'pmxi_');
|
27 |
|
28 |
+
define('PMXI_VERSION', '3.4.9');
|
29 |
|
30 |
define('PMXI_EDITION', 'free');
|
31 |
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: soflyy, wpallimport
|
3 |
Requires at least: 4.1
|
4 |
Tested up to: 4.9.6
|
5 |
-
Stable tag: 3.4.
|
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, csv importer
|
7 |
|
8 |
WP All Import is an extremely powerful importer that makes it easy to import any XML or CSV file to WordPress.
|
@@ -105,6 +105,10 @@ Does it work with special character encoding like Hebrew, Arabic, Chinese, etc?
|
|
105 |
|
106 |
== Changelog ==
|
107 |
|
|
|
|
|
|
|
|
|
108 |
= 3.4.8 =
|
109 |
* improvement: various import speed optimizations
|
110 |
* bug fix: remove deprecated function calls for PHP 7.2 compatibility
|
2 |
Contributors: soflyy, wpallimport
|
3 |
Requires at least: 4.1
|
4 |
Tested up to: 4.9.6
|
5 |
+
Stable tag: 3.4.9
|
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, csv importer
|
7 |
|
8 |
WP All Import is an extremely powerful importer that makes it easy to import any XML or CSV file to WordPress.
|
105 |
|
106 |
== Changelog ==
|
107 |
|
108 |
+
= 3.4.9 =
|
109 |
+
* bug fix: import using stream reader
|
110 |
+
* bug fix: generation temporary files in system temporary folder
|
111 |
+
|
112 |
= 3.4.8 =
|
113 |
* improvement: various import speed optimizations
|
114 |
* bug fix: remove deprecated function calls for PHP 7.2 compatibility
|