Version Description
- security fix
- bug fix: images not updated for existing products when using WooCommerce Import Add-On
Download this release
Release Info
Developer | soflyy |
Plugin | Import any XML or CSV File to WordPress |
Version | 3.6.3 |
Comparing to | |
See all releases |
Code changes from version 3.6.2 to 3.6.3
- controllers/admin/import.php +6 -6
- controllers/admin/settings.php +1 -1
- helpers/wp_all_import_filter_html_kses.php +7 -0
- models/import/record.php +32 -0
- phpunit-free.xml +0 -18
- phpunit.xml +0 -39
- plugin.php +2 -2
- readme.txt +5 -1
- views/admin/import/options/_reimport_options.php +14 -0
- views/admin/import/preview.php +2 -2
- views/admin/import/preview_images.php +21 -9
- views/admin/import/preview_prices.php +2 -2
- views/admin/import/preview_taxonomies.php +2 -0
- views/admin/import/template.php +2 -2
- views/admin/import/template/_featured_template.php +3 -3
- views/admin/import/template/_taxonomies_template.php +1 -1
controllers/admin/import.php
CHANGED
@@ -931,10 +931,10 @@ class PMXI_Admin_Import extends PMXI_Controller_Admin {
|
|
931 |
$this->data['title'] = "";
|
932 |
} else {
|
933 |
list($this->data['title']) = XmlImportParser::factory($xml, $xpath, $post['title'], $file)->parse(); unlink($file);
|
934 |
-
if ( ! isset($this->data['title'])
|
935 |
$this->errors->add('xml-parsing', __('<strong>Warning</strong>: resulting post title is empty', 'wp_all_import_plugin'));
|
936 |
}
|
937 |
-
else $this->data['title'] = ($post['is_leave_html']) ? html_entity_decode($this->data['title']) : $this->data['title'];
|
938 |
}
|
939 |
} catch (XmlImportException $e) {
|
940 |
$this->errors->add('form-validation', sprintf(__('Error parsing title: %s', 'wp_all_import_plugin'), $e->getMessage()));
|
@@ -947,10 +947,10 @@ class PMXI_Admin_Import extends PMXI_Controller_Admin {
|
|
947 |
$this->data['content'] = "";
|
948 |
} else {
|
949 |
list($this->data['content']) = XmlImportParser::factory($post['is_keep_linebreaks'] ? $xml : preg_replace('%\r\n?|\n%', ' ', $xml), $xpath, $post['content'], $file)->parse(); unlink($file);
|
950 |
-
if ( ! isset($this->data['content'])
|
951 |
$this->errors->add('xml-parsing', __('<strong>Warning</strong>: resulting post content is empty', 'wp_all_import_plugin'));
|
952 |
}
|
953 |
-
else $this->data['content'] = ($post['is_leave_html']) ? html_entity_decode($this->data['content']) : $this->data['content'];
|
954 |
}
|
955 |
} catch (XmlImportException $e) {
|
956 |
$this->errors->add('form-validation', sprintf(__('Error parsing content: %s', 'wp_all_import_plugin'), $e->getMessage()));
|
@@ -2616,9 +2616,9 @@ class PMXI_Admin_Import extends PMXI_Controller_Admin {
|
|
2616 |
}
|
2617 |
|
2618 |
if ($ajax_processing) {
|
2619 |
-
$logger = function($m) {echo "<div class='progress-msg'>[". date("H:i:s") ."] $m</div>\n";flush();};
|
2620 |
} else {
|
2621 |
-
$logger = function($m) {echo "<div class='progress-msg'
|
2622 |
}
|
2623 |
|
2624 |
$logger = apply_filters('wp_all_import_logger', $logger);
|
931 |
$this->data['title'] = "";
|
932 |
} else {
|
933 |
list($this->data['title']) = XmlImportParser::factory($xml, $xpath, $post['title'], $file)->parse(); unlink($file);
|
934 |
+
if ( ! isset($this->data['title']) || '' == strval(trim(strip_tags($this->data['title'], '<img><input><textarea><iframe><object><embed>'))) || '' == wp_all_import_filter_html_kses(($post['is_leave_html']) ? html_entity_decode($this->data['title']) : $this->data['title'])) {
|
935 |
$this->errors->add('xml-parsing', __('<strong>Warning</strong>: resulting post title is empty', 'wp_all_import_plugin'));
|
936 |
}
|
937 |
+
else $this->data['title'] = wp_all_import_filter_html_kses(($post['is_leave_html']) ? html_entity_decode($this->data['title']) : $this->data['title']);
|
938 |
}
|
939 |
} catch (XmlImportException $e) {
|
940 |
$this->errors->add('form-validation', sprintf(__('Error parsing title: %s', 'wp_all_import_plugin'), $e->getMessage()));
|
947 |
$this->data['content'] = "";
|
948 |
} else {
|
949 |
list($this->data['content']) = XmlImportParser::factory($post['is_keep_linebreaks'] ? $xml : preg_replace('%\r\n?|\n%', ' ', $xml), $xpath, $post['content'], $file)->parse(); unlink($file);
|
950 |
+
if ( ! isset($this->data['content']) || '' == strval(trim(strip_tags($this->data['content'], '<img><input><textarea><iframe><object><embed>'))) || '' == wp_all_import_filter_html_kses(($post['is_leave_html']) ? html_entity_decode($this->data['content']) : $this->data['content'])) {
|
951 |
$this->errors->add('xml-parsing', __('<strong>Warning</strong>: resulting post content is empty', 'wp_all_import_plugin'));
|
952 |
}
|
953 |
+
else $this->data['content'] = wp_all_import_filter_html_kses(($post['is_leave_html']) ? html_entity_decode($this->data['content']) : $this->data['content']);
|
954 |
}
|
955 |
} catch (XmlImportException $e) {
|
956 |
$this->errors->add('form-validation', sprintf(__('Error parsing content: %s', 'wp_all_import_plugin'), $e->getMessage()));
|
2616 |
}
|
2617 |
|
2618 |
if ($ajax_processing) {
|
2619 |
+
$logger = function($m) {echo "<div class='progress-msg'>[". date("H:i:s") ."] ".wp_all_import_filter_html_kses($m)."</div>\n";flush();};
|
2620 |
} else {
|
2621 |
+
$logger = function($m) {echo "<div class='progress-msg'>".wp_all_import_filter_html_kses($m)."</div>\n"; if ( "" != strip_tags(wp_all_import_strip_tags_content(wp_all_import_filter_html_kses($m)))) { PMXI_Plugin::$session->log .= "<p>".strip_tags(wp_all_import_strip_tags_content(wp_all_import_filter_html_kses($m)))."</p>"; flush(); }};
|
2622 |
}
|
2623 |
|
2624 |
$logger = apply_filters('wp_all_import_logger', $logger);
|
controllers/admin/settings.php
CHANGED
@@ -59,7 +59,7 @@ class PMXI_Admin_Settings extends PMXI_Controller_Admin {
|
|
59 |
|
60 |
PMXI_Plugin::getInstance()->updateOption($post);
|
61 |
|
62 |
-
if (empty($_POST['pmxi_license_activate']) and empty($_POST['pmxi_license_deactivate'])) {
|
63 |
foreach ($this->data['addons'] as $class => $addon) {
|
64 |
$post['statuses'][$class] = $this->check_license($class);
|
65 |
}
|
59 |
|
60 |
PMXI_Plugin::getInstance()->updateOption($post);
|
61 |
|
62 |
+
if (!empty($this->data['addons']) && empty($_POST['pmxi_license_activate']) and empty($_POST['pmxi_license_deactivate'])) {
|
63 |
foreach ($this->data['addons'] as $class => $addon) {
|
64 |
$post['statuses'][$class] = $this->check_license($class);
|
65 |
}
|
helpers/wp_all_import_filter_html_kses.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( !function_exists('wp_all_import_filter_html_kses')){
|
4 |
+
function wp_all_import_filter_html_kses($html, $context = 'post'){
|
5 |
+
return wp_kses($html, $context);
|
6 |
+
}
|
7 |
+
}
|
models/import/record.php
CHANGED
@@ -2262,6 +2262,36 @@ class PMXI_Import_Record extends PMXI_Model_Record {
|
|
2262 |
}
|
2263 |
// [/post format]
|
2264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2265 |
// [addons import]
|
2266 |
|
2267 |
// prepare data for import
|
@@ -2545,6 +2575,8 @@ class PMXI_Import_Record extends PMXI_Model_Record {
|
|
2545 |
$logger and call_user_func($logger, __('<b>IMAGES:</b>', 'wp_all_import_plugin'));
|
2546 |
}
|
2547 |
|
|
|
|
|
2548 |
if ( $is_images_to_update and ! empty($images_uploads) and false === $images_uploads['error'] and ( ! empty($articleData['post_type']) and in_array($articleData['post_type'], ["product", "product_variation"]) and class_exists('PMWI_Plugin') or $is_allow_import_images) and (empty($articleData['ID']) or $this->options['update_all_data'] == "yes" or ( $this->options['update_all_data'] == "no" and $this->options['is_update_images'])) ) {
|
2549 |
|
2550 |
if ( ! empty($images_bundle) ){
|
2262 |
}
|
2263 |
// [/post format]
|
2264 |
|
2265 |
+
$images_uploads = apply_filters('wp_all_import_images_uploads_dir', $uploads, $articleData, $current_xml_node, $this->id, $pid);
|
2266 |
+
|
2267 |
+
if ( $is_images_to_update and ! empty($images_uploads) and false === $images_uploads['error'] and (empty($articleData['ID']) or $this->options['update_all_data'] == "yes" or ( $this->options['update_all_data'] == "no" and $this->options['is_update_images']))) {
|
2268 |
+
// If images set to be updated then delete image related custom fields as well.
|
2269 |
+
if ( $this->options['update_images_logic'] == "full_update" ) {
|
2270 |
+
$image_custom_fields = [ '_thumbnail_id', '_product_image_gallery' ];
|
2271 |
+
foreach ( $image_custom_fields as $image_custom_field ) {
|
2272 |
+
switch ( $this->options['custom_type'] ) {
|
2273 |
+
case 'import_users':
|
2274 |
+
case 'shop_customer':
|
2275 |
+
delete_user_meta( $pid, $image_custom_field );
|
2276 |
+
break;
|
2277 |
+
case 'taxonomies':
|
2278 |
+
delete_term_meta( $pid, $image_custom_field );
|
2279 |
+
break;
|
2280 |
+
case 'woo_reviews':
|
2281 |
+
case 'comments':
|
2282 |
+
delete_comment_meta( $pid, $image_custom_field );
|
2283 |
+
break;
|
2284 |
+
case 'gf_entries':
|
2285 |
+
// No actions required.
|
2286 |
+
break;
|
2287 |
+
default:
|
2288 |
+
delete_post_meta( $pid, $image_custom_field );
|
2289 |
+
break;
|
2290 |
+
}
|
2291 |
+
}
|
2292 |
+
}
|
2293 |
+
}
|
2294 |
+
|
2295 |
// [addons import]
|
2296 |
|
2297 |
// prepare data for import
|
2575 |
$logger and call_user_func($logger, __('<b>IMAGES:</b>', 'wp_all_import_plugin'));
|
2576 |
}
|
2577 |
|
2578 |
+
|
2579 |
+
|
2580 |
if ( $is_images_to_update and ! empty($images_uploads) and false === $images_uploads['error'] and ( ! empty($articleData['post_type']) and in_array($articleData['post_type'], ["product", "product_variation"]) and class_exists('PMWI_Plugin') or $is_allow_import_images) and (empty($articleData['ID']) or $this->options['update_all_data'] == "yes" or ( $this->options['update_all_data'] == "no" and $this->options['is_update_images'])) ) {
|
2581 |
|
2582 |
if ( ! empty($images_bundle) ){
|
phpunit-free.xml
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<phpunit
|
2 |
-
bootstrap="tests/bootstrap-free.php"
|
3 |
-
backupGlobals="false"
|
4 |
-
colors="true"
|
5 |
-
convertErrorsToExceptions="true"
|
6 |
-
convertNoticesToExceptions="true"
|
7 |
-
convertWarningsToExceptions="true"
|
8 |
-
>
|
9 |
-
<testsuites>
|
10 |
-
<testsuite name="basic">
|
11 |
-
<file>tests/free-edition-test-posts.php</file>
|
12 |
-
<file>tests/free-edition-test-pages.php</file>
|
13 |
-
</testsuite>
|
14 |
-
<testsuite name="products">
|
15 |
-
<directory prefix="free-edition-test-products-" suffix=".php">tests</directory>
|
16 |
-
</testsuite>
|
17 |
-
</testsuites>
|
18 |
-
</phpunit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpunit.xml
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<phpunit
|
2 |
-
bootstrap="tests/bootstrap.php"
|
3 |
-
backupGlobals="false"
|
4 |
-
colors="true"
|
5 |
-
convertErrorsToExceptions="true"
|
6 |
-
convertNoticesToExceptions="true"
|
7 |
-
convertWarningsToExceptions="true"
|
8 |
-
>
|
9 |
-
<testsuites>
|
10 |
-
<testsuite name="basic">
|
11 |
-
<file>tests/test-posts.php</file>
|
12 |
-
<file>tests/test-pages.php</file>
|
13 |
-
</testsuite>
|
14 |
-
<testsuite name="products">
|
15 |
-
<directory prefix="test-products-" suffix=".php">tests</directory>
|
16 |
-
</testsuite>
|
17 |
-
<testsuite name="simple-products">
|
18 |
-
<directory prefix="test-products-simple" suffix=".php">tests</directory>
|
19 |
-
</testsuite>
|
20 |
-
<testsuite name="external-products">
|
21 |
-
<directory prefix="test-products-external" suffix=".php">tests</directory>
|
22 |
-
</testsuite>
|
23 |
-
<testsuite name="grouped-products">
|
24 |
-
<directory prefix="test-products-grouped" suffix=".php">tests</directory>
|
25 |
-
</testsuite>
|
26 |
-
<testsuite name="variable-products">
|
27 |
-
<directory prefix="test-products-variable" suffix=".php">tests</directory>
|
28 |
-
</testsuite>
|
29 |
-
<testsuite name="images">
|
30 |
-
<directory prefix="test-images" suffix=".php">tests</directory>
|
31 |
-
</testsuite>
|
32 |
-
<!-- <testsuite name="user">
|
33 |
-
<file>tests/test-users.php</file>
|
34 |
-
</testsuite> -->
|
35 |
-
<!--testsuite name="acf">
|
36 |
-
<file>tests/test-acf.php</file>
|
37 |
-
</testsuite-->
|
38 |
-
</testsuites>
|
39 |
-
</phpunit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plugin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP All Import
|
4 |
Plugin URI: http://www.wpallimport.com/wordpress-xml-csv-import/?utm_source=import-plugin-free&utm_medium=wp-plugins-page&utm_campaign=upgrade-to-pro
|
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.6.
|
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.6.
|
29 |
|
30 |
define('PMXI_EDITION', 'free');
|
31 |
|
3 |
Plugin Name: WP All Import
|
4 |
Plugin URI: http://www.wpallimport.com/wordpress-xml-csv-import/?utm_source=import-plugin-free&utm_medium=wp-plugins-page&utm_campaign=upgrade-to-pro
|
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.6.3
|
7 |
Author: Soflyy
|
8 |
*/
|
9 |
|
25 |
*/
|
26 |
define('WP_ALL_IMPORT_PREFIX', 'pmxi_');
|
27 |
|
28 |
+
define('PMXI_VERSION', '3.6.3');
|
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: 5.8
|
5 |
-
Stable tag: 3.6.
|
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.6.2 =
|
109 |
* improvement: add ability to control taxonomy mapping case sensitivity via filter wpai_is_case_insensitive_taxonomy_mapping
|
110 |
* improvement: add ability to control uploads directory for single file/image via filters wp_all_import_single_image_uploads_dir and wp_all_import_single_attachment_uploads_dir
|
2 |
Contributors: soflyy, wpallimport
|
3 |
Requires at least: 4.1
|
4 |
Tested up to: 5.8
|
5 |
+
Stable tag: 3.6.3
|
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.6.3 =
|
109 |
+
* security fix
|
110 |
+
* bug fix: images not updated for existing products when using WooCommerce Import Add-On
|
111 |
+
|
112 |
= 3.6.2 =
|
113 |
* improvement: add ability to control taxonomy mapping case sensitivity via filter wpai_is_case_insensitive_taxonomy_mapping
|
114 |
* improvement: add ability to control uploads directory for single file/image via filters wp_all_import_single_image_uploads_dir and wp_all_import_single_attachment_uploads_dir
|
views/admin/import/options/_reimport_options.php
CHANGED
@@ -70,6 +70,20 @@
|
|
70 |
<a href="#help" class="wpallimport-help" style="position: relative; top: -2px;" title="<?php printf(__('These options will only be used if you run this import again later. All data is imported the first time you run an import.<br/><br/>Note that WP All Import will only update/remove %s created by this import. If you want to match to %s that already exist on this site, use Existing Items in Step 1.', 'wp_all_import_plugin'), $cpt_name, $cpt_name) ?>">?</a>
|
71 |
<?php endif; ?>
|
72 |
<div class="switcher-target-is_not_keep_former_posts" style="padding-left:17px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
<input type="radio" id="update_all_data" class="switcher" name="update_all_data" value="yes" <?php echo 'no' != $post['update_all_data'] ? 'checked="checked"': '' ?>/>
|
74 |
<label for="update_all_data"><?php _e('Update all data', 'wp_all_import_plugin' )?></label><br>
|
75 |
|
70 |
<a href="#help" class="wpallimport-help" style="position: relative; top: -2px;" title="<?php printf(__('These options will only be used if you run this import again later. All data is imported the first time you run an import.<br/><br/>Note that WP All Import will only update/remove %s created by this import. If you want to match to %s that already exist on this site, use Existing Items in Step 1.', 'wp_all_import_plugin'), $cpt_name, $cpt_name) ?>">?</a>
|
71 |
<?php endif; ?>
|
72 |
<div class="switcher-target-is_not_keep_former_posts" style="padding-left:17px;">
|
73 |
+
|
74 |
+
<div class="input" style="margin-left: 4px;">
|
75 |
+
<input type="hidden" name="is_selective_hashing" value="0" />
|
76 |
+
<input type="checkbox" id="is_selective_hashing" name="is_selective_hashing" value="1" <?php echo $post['is_selective_hashing'] ? 'checked="checked"': '' ?> class="switcher"/>
|
77 |
+
<label for="is_selective_hashing"><?php printf(__('Skip %s if their data in your file has not changed', 'wp_all_import_plugin'), strtolower($custom_type->labels->name)); ?></label>
|
78 |
+
<a href="#help" class="wpallimport-help" style="position: relative; top: -2px;" title="<?php _e('When enabled, WP All Import will keep track of every post\'s data as it is imported. When the import is run again, posts will be skipped if their data in the import file has not changed since the last run.<br/><br/>Posts will not be skipped if the import template or settings change, or if you make changes to the custom code in the Function Editor.', 'wp_all_import_plugin') ?>">?</a>
|
79 |
+
<div class="switcher-target-is_selective_hashing" style="padding-left:17px;">
|
80 |
+
<div class="wpallimport-free-edition-notice" style="margin: 20px 0;">
|
81 |
+
<a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707176&edd_options%5Bprice_id%5D=1&utm_source=import-plugin-free&utm_medium=upgrade-notice&utm_campaign=download-from-url" target="_blank" class="upgrade_link"><?php _e('Upgrade to the Pro edition of WP All Import to use this option', 'wp_all_import_plugin'); ?></a>
|
82 |
+
<p style="margin-top:16px;"><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_import_plugin'); ?></p>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
|
87 |
<input type="radio" id="update_all_data" class="switcher" name="update_all_data" value="yes" <?php echo 'no' != $post['update_all_data'] ? 'checked="checked"': '' ?>/>
|
88 |
<label for="update_all_data"><?php _e('Update all data', 'wp_all_import_plugin' )?></label><br>
|
89 |
|
views/admin/import/preview.php
CHANGED
@@ -15,10 +15,10 @@
|
|
15 |
<?php endif ?>
|
16 |
|
17 |
<?php if (isset($title)): ?>
|
18 |
-
<h2 class="title"><?php echo $title; ?></h2>
|
19 |
<?php endif ?>
|
20 |
<?php if (isset($content)): ?>
|
21 |
-
<?php echo apply_filters('the_content', $content) ?>
|
22 |
<?php endif ?>
|
23 |
|
24 |
</div>
|
15 |
<?php endif ?>
|
16 |
|
17 |
<?php if (isset($title)): ?>
|
18 |
+
<h2 class="title"><?php echo wp_all_import_filter_html_kses($title); ?></h2>
|
19 |
<?php endif ?>
|
20 |
<?php if (isset($content)): ?>
|
21 |
+
<?php echo apply_filters('the_content', wp_all_import_filter_html_kses($content)) ?>
|
22 |
<?php endif ?>
|
23 |
|
24 |
</div>
|
views/admin/import/preview_images.php
CHANGED
@@ -64,8 +64,10 @@
|
|
64 |
<h4><?php _e('WP All Import will import images from the following file paths:', 'wp_all_import_plugin'); ?></h4>
|
65 |
<p><?php _e('Please ensure the images exists at these file paths', 'wp_all_import_plugin'); ?></p>
|
66 |
<ul class="images_list">
|
67 |
-
<?php foreach ($imgs as $img) :
|
68 |
-
|
|
|
|
|
69 |
<li rel="<?php echo trim($img);?>"><?php echo trim(preg_replace('%.*/wp-content%', '/wp-content', $wp_uploads['basedir']) . DIRECTORY_SEPARATOR . PMXI_Plugin::FILES_DIRECTORY . DIRECTORY_SEPARATOR . trim($img)); ?></li>
|
70 |
|
71 |
<?php endforeach; ?>
|
@@ -73,7 +75,9 @@
|
|
73 |
<h4><?php _e('Here are the above URLs, in <img> tags. '); ?></h4>
|
74 |
|
75 |
<?php
|
76 |
-
foreach ($imgs as $img) {
|
|
|
|
|
77 |
$img_url = site_url() . preg_replace('%.*/wp-content%', '/wp-content', $wp_uploads['basedir']) . DIRECTORY_SEPARATOR . PMXI_Plugin::FILES_DIRECTORY . DIRECTORY_SEPARATOR . trim($img);
|
78 |
?>
|
79 |
<img src="<?php echo trim($img_url);?>" style="width:64px; margin:5px; vertical-align:top;"/>
|
@@ -97,8 +101,9 @@
|
|
97 |
<p><?php _e('Please ensure the images exists at media library', 'wp_all_import_plugin'); ?></p>
|
98 |
<ul class="images_list">
|
99 |
<?php foreach ($imgs as $img) : ?>
|
100 |
-
|
101 |
<?php
|
|
|
102 |
|
103 |
$bn = wp_all_import_sanitize_filename(basename($img));
|
104 |
$img_ext = pmxi_getExtensionFromStr($img);
|
@@ -116,8 +121,10 @@
|
|
116 |
|
117 |
<?php
|
118 |
foreach ($imgs as $img)
|
119 |
-
{
|
120 |
-
$
|
|
|
|
|
121 |
$img_ext = pmxi_getExtensionFromStr($img);
|
122 |
$default_extension = pmxi_getExtension($bn);
|
123 |
|
@@ -145,15 +152,20 @@
|
|
145 |
<h4><?php _e('WP All Import will attempt to import images from the following URLs:'); ?></h4>
|
146 |
<p><?php _e('Please check the URLs to ensure they point to valid images'); ?></p>
|
147 |
<ul class="images_list">
|
148 |
-
<?php foreach ($imgs as $img):
|
|
|
|
|
149 |
|
150 |
<li rel="<?php echo trim($img); ?>"><a href="<?php echo trim($img); ?>" target="_blank"><?php echo trim($img); ?></a></li>
|
151 |
|
152 |
<?php endforeach; ?>
|
153 |
</ul>
|
154 |
<h4><?php _e('Here are the above URLs, in <img> tags. '); ?></h4>
|
155 |
-
<?php foreach ($imgs as $img) :
|
156 |
-
|
|
|
|
|
|
|
157 |
<img src="<?php echo trim($img);?>" style="width:64px; margin:5px; vertical-align:top;"/>
|
158 |
|
159 |
<?php endforeach; ?>
|
64 |
<h4><?php _e('WP All Import will import images from the following file paths:', 'wp_all_import_plugin'); ?></h4>
|
65 |
<p><?php _e('Please ensure the images exists at these file paths', 'wp_all_import_plugin'); ?></p>
|
66 |
<ul class="images_list">
|
67 |
+
<?php foreach ($imgs as $img) :
|
68 |
+
$img = wp_all_import_filter_html_kses($img);
|
69 |
+
?>
|
70 |
+
|
71 |
<li rel="<?php echo trim($img);?>"><?php echo trim(preg_replace('%.*/wp-content%', '/wp-content', $wp_uploads['basedir']) . DIRECTORY_SEPARATOR . PMXI_Plugin::FILES_DIRECTORY . DIRECTORY_SEPARATOR . trim($img)); ?></li>
|
72 |
|
73 |
<?php endforeach; ?>
|
75 |
<h4><?php _e('Here are the above URLs, in <img> tags. '); ?></h4>
|
76 |
|
77 |
<?php
|
78 |
+
foreach ($imgs as $img) {
|
79 |
+
$img = wp_all_import_filter_html_kses($img);
|
80 |
+
|
81 |
$img_url = site_url() . preg_replace('%.*/wp-content%', '/wp-content', $wp_uploads['basedir']) . DIRECTORY_SEPARATOR . PMXI_Plugin::FILES_DIRECTORY . DIRECTORY_SEPARATOR . trim($img);
|
82 |
?>
|
83 |
<img src="<?php echo trim($img_url);?>" style="width:64px; margin:5px; vertical-align:top;"/>
|
101 |
<p><?php _e('Please ensure the images exists at media library', 'wp_all_import_plugin'); ?></p>
|
102 |
<ul class="images_list">
|
103 |
<?php foreach ($imgs as $img) : ?>
|
104 |
+
|
105 |
<?php
|
106 |
+
$img = wp_all_import_filter_html_kses($img);
|
107 |
|
108 |
$bn = wp_all_import_sanitize_filename(basename($img));
|
109 |
$img_ext = pmxi_getExtensionFromStr($img);
|
121 |
|
122 |
<?php
|
123 |
foreach ($imgs as $img)
|
124 |
+
{
|
125 |
+
$img = wp_all_import_filter_html_kses($img);
|
126 |
+
|
127 |
+
$bn = wp_all_import_sanitize_filename(basename($img));
|
128 |
$img_ext = pmxi_getExtensionFromStr($img);
|
129 |
$default_extension = pmxi_getExtension($bn);
|
130 |
|
152 |
<h4><?php _e('WP All Import will attempt to import images from the following URLs:'); ?></h4>
|
153 |
<p><?php _e('Please check the URLs to ensure they point to valid images'); ?></p>
|
154 |
<ul class="images_list">
|
155 |
+
<?php foreach ($imgs as $img):
|
156 |
+
$img = wp_all_import_filter_html_kses($img);
|
157 |
+
?>
|
158 |
|
159 |
<li rel="<?php echo trim($img); ?>"><a href="<?php echo trim($img); ?>" target="_blank"><?php echo trim($img); ?></a></li>
|
160 |
|
161 |
<?php endforeach; ?>
|
162 |
</ul>
|
163 |
<h4><?php _e('Here are the above URLs, in <img> tags. '); ?></h4>
|
164 |
+
<?php foreach ($imgs as $img) :
|
165 |
+
$img = wp_all_import_filter_html_kses($img);
|
166 |
+
|
167 |
+
?>
|
168 |
+
|
169 |
<img src="<?php echo trim($img);?>" style="width:64px; margin:5px; vertical-align:top;"/>
|
170 |
|
171 |
<?php endforeach; ?>
|
views/admin/import/preview_prices.php
CHANGED
@@ -15,8 +15,8 @@
|
|
15 |
|
16 |
<h3><?php _e('Preview Prices', 'wp_all_import_plugin'); ?></h3>
|
17 |
|
18 |
-
<p><?php _e('Regular Price', 'wp_all_import_plugin'); ?>: <?php echo empty($product_regular_price) ? '' : $product_regular_price; ?></p>
|
19 |
-
<p><?php _e('Sale Price', 'wp_all_import_plugin'); ?>: <?php echo empty($product_sale_price) ? '' : $product_sale_price; ?></p>
|
20 |
|
21 |
</div>
|
22 |
|
15 |
|
16 |
<h3><?php _e('Preview Prices', 'wp_all_import_plugin'); ?></h3>
|
17 |
|
18 |
+
<p><?php _e('Regular Price', 'wp_all_import_plugin'); ?>: <?php echo empty($product_regular_price) ? '' : wp_all_import_filter_html_kses($product_regular_price); ?></p>
|
19 |
+
<p><?php _e('Sale Price', 'wp_all_import_plugin'); ?>: <?php echo empty($product_sale_price) ? '' : wp_all_import_filter_html_kses($product_sale_price); ?></p>
|
20 |
|
21 |
</div>
|
22 |
|
views/admin/import/preview_taxonomies.php
CHANGED
@@ -25,6 +25,8 @@
|
|
25 |
if (!empty($terms_arr) and is_array($terms_arr)){
|
26 |
foreach ($terms_arr as $terms) {
|
27 |
|
|
|
|
|
28 |
// Apply mapping before splitting via separator symbol
|
29 |
if (! empty($post['tax_enable_mapping'][$ctx]) and !empty($post['tax_logic_mapping'][$ctx])){
|
30 |
$mapping_rules = json_decode($post['tax_mapping'][$ctx], true);
|
25 |
if (!empty($terms_arr) and is_array($terms_arr)){
|
26 |
foreach ($terms_arr as $terms) {
|
27 |
|
28 |
+
$terms = wp_all_import_filter_html_kses($terms);
|
29 |
+
|
30 |
// Apply mapping before splitting via separator symbol
|
31 |
if (! empty($post['tax_enable_mapping'][$ctx]) and !empty($post['tax_logic_mapping'][$ctx])){
|
32 |
$mapping_rules = json_decode($post['tax_mapping'][$ctx], true);
|
views/admin/import/template.php
CHANGED
@@ -50,14 +50,14 @@
|
|
50 |
<div style="padding: 15px 25px 65px;">
|
51 |
<div id="titlediv" style="margin-bottom:20px;">
|
52 |
<div id="titlewrap">
|
53 |
-
<input id="wpallimport-title" class="widefat" type="text" name="title" value="<?php echo esc_attr($post['title']) ?>" placeholder="<?php _e('Drag & drop any element on the right to set the title.', 'wp_all_import_plugin'); ?>"/>
|
54 |
</div>
|
55 |
</div>
|
56 |
|
57 |
<div id="poststuff" style="margin-top:-25px;">
|
58 |
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
|
59 |
|
60 |
-
<?php wp_editor($post['content'], 'content', array(
|
61 |
//'teeny' => true,
|
62 |
'editor_class' => 'wpallimport-plugin-editor',
|
63 |
'media_buttons' => false,
|
50 |
<div style="padding: 15px 25px 65px;">
|
51 |
<div id="titlediv" style="margin-bottom:20px;">
|
52 |
<div id="titlewrap">
|
53 |
+
<input id="wpallimport-title" class="widefat" type="text" name="title" value="<?php echo esc_attr(wp_all_import_filter_html_kses($post['title'])) ?>" placeholder="<?php _e('Drag & drop any element on the right to set the title.', 'wp_all_import_plugin'); ?>"/>
|
54 |
</div>
|
55 |
</div>
|
56 |
|
57 |
<div id="poststuff" style="margin-top:-25px;">
|
58 |
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
|
59 |
|
60 |
+
<?php wp_editor(wp_all_import_filter_html_kses($post['content']), 'content', array(
|
61 |
//'teeny' => true,
|
62 |
'editor_class' => 'wpallimport-plugin-editor',
|
63 |
'media_buttons' => false,
|
views/admin/import/template/_featured_template.php
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
<div class="switcher-target-<?php echo $section_slug; ?>download_images_yes" style="padding-left:27px;">
|
26 |
<label for="<?php echo $section_slug; ?>download_featured_delim"><?php _e('Enter image URL one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
27 |
<input type="text" class="small" id="<?php echo $section_slug; ?>download_featured_delim" name="<?php echo $section_slug; ?>download_featured_delim" value="<?php echo esc_attr($post[$section_slug . 'download_featured_delim']) ?>" style="width:5%; text-align:center;"/>
|
28 |
-
<textarea name="<?php echo $section_slug; ?>download_featured_image" class="newline rad4" style="clear: both; display:block;" placeholder=""><?php echo esc_attr($post[$section_slug . 'download_featured_image']) ?></textarea>
|
29 |
</div>
|
30 |
<div class="input">
|
31 |
<input type="radio" name="<?php echo $section_slug; ?>download_images" value="gallery" class="switcher" id="<?php echo $section_slug; ?>download_images_gallery" <?php echo ("gallery" == $post[$section_slug . 'download_images']) ? 'checked="checked"' : '';?>/>
|
@@ -35,7 +35,7 @@
|
|
35 |
<div class="switcher-target-<?php echo $section_slug; ?>download_images_gallery" style="padding-left:27px;">
|
36 |
<label for="<?php echo $section_slug; ?>gallery_featured_delim"><?php _e('Enter image filenames one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
37 |
<input type="text" class="small" id="<?php echo $section_slug; ?>gallery_featured_delim" name="<?php echo $section_slug; ?>gallery_featured_delim" value="<?php echo esc_attr($post[$section_slug . 'gallery_featured_delim']) ?>" style="width:5%; text-align:center;"/>
|
38 |
-
<textarea name="<?php echo $section_slug; ?>gallery_featured_image" class="newline rad4" style="clear: both; display:block; "><?php echo esc_attr($post[$section_slug . 'gallery_featured_image']) ?></textarea>
|
39 |
</div>
|
40 |
<div class="input">
|
41 |
<?php $wp_uploads = wp_upload_dir(); ?>
|
@@ -45,7 +45,7 @@
|
|
45 |
<div class="switcher-target-<?php echo $section_slug; ?>download_images_no" style="padding-left:27px;">
|
46 |
<label for="<?php echo $section_slug; ?>featured_delim"><?php _e('Enter image filenames one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
47 |
<input type="text" class="small" id="<?php echo $section_slug; ?>featured_delim" name="<?php echo $section_slug; ?>featured_delim" value="<?php echo esc_attr($post[$section_slug . 'featured_delim']) ?>" style="width:5%; text-align:center;"/>
|
48 |
-
<textarea name="<?php echo $section_slug; ?>featured_image" class="newline rad4" style="clear: both; display:block; "><?php echo esc_attr($post[$section_slug . 'featured_image']) ?></textarea>
|
49 |
</div>
|
50 |
</div>
|
51 |
<h4><?php _e('Image Options', 'wp_all_import_plugin'); ?></h4>
|
25 |
<div class="switcher-target-<?php echo $section_slug; ?>download_images_yes" style="padding-left:27px;">
|
26 |
<label for="<?php echo $section_slug; ?>download_featured_delim"><?php _e('Enter image URL one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
27 |
<input type="text" class="small" id="<?php echo $section_slug; ?>download_featured_delim" name="<?php echo $section_slug; ?>download_featured_delim" value="<?php echo esc_attr($post[$section_slug . 'download_featured_delim']) ?>" style="width:5%; text-align:center;"/>
|
28 |
+
<textarea name="<?php echo $section_slug; ?>download_featured_image" class="newline rad4" style="clear: both; display:block;" placeholder=""><?php echo esc_attr(wp_all_import_filter_html_kses($post[$section_slug . 'download_featured_image'])) ?></textarea>
|
29 |
</div>
|
30 |
<div class="input">
|
31 |
<input type="radio" name="<?php echo $section_slug; ?>download_images" value="gallery" class="switcher" id="<?php echo $section_slug; ?>download_images_gallery" <?php echo ("gallery" == $post[$section_slug . 'download_images']) ? 'checked="checked"' : '';?>/>
|
35 |
<div class="switcher-target-<?php echo $section_slug; ?>download_images_gallery" style="padding-left:27px;">
|
36 |
<label for="<?php echo $section_slug; ?>gallery_featured_delim"><?php _e('Enter image filenames one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
37 |
<input type="text" class="small" id="<?php echo $section_slug; ?>gallery_featured_delim" name="<?php echo $section_slug; ?>gallery_featured_delim" value="<?php echo esc_attr($post[$section_slug . 'gallery_featured_delim']) ?>" style="width:5%; text-align:center;"/>
|
38 |
+
<textarea name="<?php echo $section_slug; ?>gallery_featured_image" class="newline rad4" style="clear: both; display:block; "><?php echo esc_attr(wp_all_import_filter_html_kses($post[$section_slug . 'gallery_featured_image'])) ?></textarea>
|
39 |
</div>
|
40 |
<div class="input">
|
41 |
<?php $wp_uploads = wp_upload_dir(); ?>
|
45 |
<div class="switcher-target-<?php echo $section_slug; ?>download_images_no" style="padding-left:27px;">
|
46 |
<label for="<?php echo $section_slug; ?>featured_delim"><?php _e('Enter image filenames one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
47 |
<input type="text" class="small" id="<?php echo $section_slug; ?>featured_delim" name="<?php echo $section_slug; ?>featured_delim" value="<?php echo esc_attr($post[$section_slug . 'featured_delim']) ?>" style="width:5%; text-align:center;"/>
|
48 |
+
<textarea name="<?php echo $section_slug; ?>featured_image" class="newline rad4" style="clear: both; display:block; "><?php echo esc_attr(wp_all_import_filter_html_kses($post[$section_slug . 'featured_image'])) ?></textarea>
|
49 |
</div>
|
50 |
</div>
|
51 |
<h4><?php _e('Image Options', 'wp_all_import_plugin'); ?></h4>
|
views/admin/import/template/_taxonomies_template.php
CHANGED
@@ -93,7 +93,7 @@ if ( ! empty($post_taxonomies)):
|
|
93 |
<li class="dragging">
|
94 |
<div style="position:relative;">
|
95 |
<input type="hidden" class="assign_term" name="tax_hierarchical_assing[<?php echo $ctx->name;?>][<?php echo $k;?>]" value="1"/>
|
96 |
-
<input type="text" class="widefat hierarchical_xpath_field" name="tax_hierarchical_xpath[<?php echo $ctx->name; ?>][]" value="<?php echo esc_textarea($path); ?>"/>
|
97 |
<a href="javascript:void(0);" class="icon-item remove-ico"></a>
|
98 |
</div>
|
99 |
</li>
|
93 |
<li class="dragging">
|
94 |
<div style="position:relative;">
|
95 |
<input type="hidden" class="assign_term" name="tax_hierarchical_assing[<?php echo $ctx->name;?>][<?php echo $k;?>]" value="1"/>
|
96 |
+
<input type="text" class="widefat hierarchical_xpath_field" name="tax_hierarchical_xpath[<?php echo $ctx->name; ?>][]" value="<?php echo esc_textarea(wp_all_import_filter_html_kses($path)); ?>"/>
|
97 |
<a href="javascript:void(0);" class="icon-item remove-ico"></a>
|
98 |
</div>
|
99 |
</li>
|