Version Description
Download this release
Release Info
Developer | smackcoders |
Plugin | Ultimate CSV Importer |
Version | 5.3 |
Comparing to | |
See all releases |
Code changes from version 5.2 to 5.3
- Readme.txt +36 -16
- admin/class-uci-admin.php +32 -19
- admin/views/form-advanced-mapping-configuration.php +49 -71
- admin/views/form-export-data.php +47 -7
- admin/views/form-file-import-method.php +9 -0
- admin/views/form-ignite-import.php +8 -1
- admin/views/form-import-configuration.php +20 -5
- admin/views/form-mapping-configuration.php +13 -3
- admin/views/form-settings-view.php +42 -1
- assets/css/style-maintenance.css +27 -0
- assets/js/ultimate-importer.js +60 -9
- includes/class-uci-cfs-data-import.php +90 -0
- includes/class-uci-exporter.php +27 -4
- includes/class-uci-helper.php +100 -1
- includes/class-uci-user-data-import.php +1 -1
- index.php +37 -2
Readme.txt
CHANGED
@@ -1,22 +1,24 @@
|
|
1 |
-
=== CSV
|
2 |
Contributors: smackcoders, smacksupport
|
3 |
Donate link: https://www.paypal.me/smackcoders
|
4 |
-
Tags: csv
|
5 |
-
Requires at least: 4.
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 5.
|
8 |
-
Version: 5.
|
9 |
Author: smackcoders
|
10 |
Author URI: http://profiles.wordpress.org/smackcoders/
|
11 |
License: GPLv2 or later
|
12 |
-
|
13 |
|
14 |
== Description ==
|
15 |
-
|
|
|
|
|
16 |
|
17 |
The image can be imported from external URL like Google image, pixabay, shutterstock, etc,. The images are imported in the background with the help of WP-CRON to enhance the performance. You can [easily configure your WP-Cron](http://www.smackcoders.com/blog/enable-configure-wp-cron.html?utm_source=web&utm_campaign=wp_org&utm_medium=readme) for faster import.
|
18 |
|
19 |
-
Please show your support for
|
20 |
|
21 |
= Modules supported in Import and Export =
|
22 |
* Core Modules - Post, Page, Custom Post, Comments and Users.
|
@@ -51,7 +53,7 @@ Please show your support for WP Ultimate CSV Importer by giving it a [rating](ht
|
|
51 |
[youtube https://www.youtube.com/watch?v=Uho22R0BCHQ&feature=youtu.be]
|
52 |
|
53 |
= Ultimate CSV Importer PRO =
|
54 |
-
|
55 |
|
56 |
= Supported Modules To Import and Export =
|
57 |
* Core Module - Post, Page, Custom Post, Comments, Category, Tags, Users, Customer Reviews.
|
@@ -74,7 +76,7 @@ Ultimate CSV Importer PRO has all the features of WP Ultimate CSV Importer and i
|
|
74 |
* Imported modules can be managed in the File manager.
|
75 |
* Detailed logs are maintained in the Log manager.
|
76 |
* Duplicate handling with any of the WordPress field.
|
77 |
-
* Import all the supported features of
|
78 |
* Extendable for your needs with [API](https://www.smackcoders.com/document/docs/api/classes/SmackUCI_API.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org).
|
79 |
|
80 |
= Helpful Links =
|
@@ -83,7 +85,7 @@ Ultimate CSV Importer PRO has all the features of WP Ultimate CSV Importer and i
|
|
83 |
Watch our [product video](https://youtu.be/Uho22R0BCHQ)
|
84 |
You can try the [live demo](http://demo.smackcoders.com/wordpress/wp-admin/admin.php?page=sm-uci-dashboard) or request for free trial by clicking Try Now in [WordPress Ultimate CSV Importer](http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org) page to generate your own WordPress test environment.
|
85 |
|
86 |
-
Read our [blog](http://www.smackcoders.com/blog/category/wordpress-products?utm_source=web&utm_campaign=readme&utm_medium=wp_org) to know more about the new [features](http://www.smackcoders.com/wp-ultimate-csv-importer-pro
|
87 |
|
88 |
[FAQ](http://www.smackcoders.com/wordpress-products-faq.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org) and [Troubleshooting tips](https://wordpress.org/support/topic/tips-to-trouble-shoot-wp-ultimate-csv-importer-issues-1)
|
89 |
|
@@ -110,13 +112,13 @@ Import may hang due to the following reasons<br />
|
|
110 |
* System Requirements are not matched the required values.<br />
|
111 |
|
112 |
2. How to validate a CSV? <br />
|
113 |
-
|
114 |
|
115 |
3. What are the supported CSV Formats? <br />
|
116 |
-
|
117 |
|
118 |
4. What are the Minimum Requirements needed to upload CSV? <br />
|
119 |
-
Basic System Requirements need to be met to upload a CSV with bulk of records. Kindly check your System Requirements by Settings → Security and Performance on
|
120 |
|
121 |
5. Why my featured images not getting uploaded? <br />
|
122 |
The importer uploads images in the background for faster performance and it requires WP-Cron to be enabled. You can [easily configure WP-Cron](http://www.smackcoders.com/blog/enable-configure-wp-cron.html?utm_source=wp_org&utm_campaign=readme&utm_medium=faq) for smooth and speedy import. <br />
|
@@ -127,6 +129,22 @@ The importer supports [default WordPress Text and Text area fields](http://www.s
|
|
127 |
For more FAQ, you can refer [here](http://www.smackcoders.com/wordpress-products-faq.html?utm_source=wp_org&utm_campaign=readme&utm_medium=faq).
|
128 |
|
129 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
= 5.2 =
|
131 |
* Added: Advance mapping view with Drag ‘n’ Drop support.
|
132 |
* Added: Ultimate member plugin support for Users Import.
|
@@ -447,13 +465,15 @@ For more FAQ, you can refer [here](http://www.smackcoders.com/wordpress-products
|
|
447 |
* Added featured image import feature along with post/page/custom post.
|
448 |
= 1.0.2 =
|
449 |
* Bug fixed to recognize the trimmed trailing space in the CSV file
|
450 |
-
* Added validation for
|
451 |
= 1.0.1 =
|
452 |
* Added features to import multiple tags and categories with different delimiters.
|
453 |
= 1.0.0 =
|
454 |
* Initial release version. Tested and found works well without any issues.
|
455 |
|
456 |
== Upgrade Notice ==
|
|
|
|
|
457 |
= 5.2 =
|
458 |
* Upgrade now to get enhanced User Interface and support for latest version of All in one SEO. 2.3.12.1.
|
459 |
= 5.1.1 =
|
1 |
+
=== CSV Importer & Exporter ===
|
2 |
Contributors: smackcoders, smacksupport
|
3 |
Donate link: https://www.paypal.me/smackcoders
|
4 |
+
Tags: csv, wordpress csv import, csv importer, import, import csv, import seo, import woocommerce, acf, excel, export, spreadsheet
|
5 |
+
Requires at least: 4.1
|
6 |
+
Tested up to: 4.8
|
7 |
+
Stable tag: 5.3
|
8 |
+
Version: 5.3
|
9 |
Author: smackcoders
|
10 |
Author URI: http://profiles.wordpress.org/smackcoders/
|
11 |
License: GPLv2 or later
|
12 |
+
Simple, powerful and easy CSV Import export plugin even for newbies and novice users.
|
13 |
|
14 |
== Description ==
|
15 |
+
Rated as one of the Top 500 plugins by [WPMETA.ORG](http://www.wpmeta.org/plugins/wp-ultimate-csv-importer/). The only well managed, supported and regularly updated importer plugin with great track record. Manage your wordpress content as simple as in a spreadsheet editor like Microsoft Excel or Open Office etc.
|
16 |
+
|
17 |
+
[Ultimate CSV Importer](http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org) is an import and export tool that helps to build a WordPress site at the drop of a hat by importing Post, Page, Custom Post, Users, Comments, [WordPress Custom Fields](http://www.smackcoders.com/blog/adding-custom-fields-data-wordpress-free-wp-ultimate-csv-importer.html?utm_source=web&utm_campaign=wp_org&utm_medium=readme) & [CustomPress fields](http://www.smackcoders.com/blog/custompress-import.html?utm_source=web&utm_campaign=wp_org&utm_medium=readme), Reviews of WP Customer Reviews and SEO fields of All in One SEO. The plugin supports export and import of all Custom Post Types. The import is for selective modules, but the export is for all the core modules along with few third party plugins.
|
18 |
|
19 |
The image can be imported from external URL like Google image, pixabay, shutterstock, etc,. The images are imported in the background with the help of WP-CRON to enhance the performance. You can [easily configure your WP-Cron](http://www.smackcoders.com/blog/enable-configure-wp-cron.html?utm_source=web&utm_campaign=wp_org&utm_medium=readme) for faster import.
|
20 |
|
21 |
+
Please show your support for CSV Importer by giving it a [rating](https://wordpress.org/support/view/plugin-reviews/wp-ultimate-csv-importer?rate=5#postform) :)
|
22 |
|
23 |
= Modules supported in Import and Export =
|
24 |
* Core Modules - Post, Page, Custom Post, Comments and Users.
|
53 |
[youtube https://www.youtube.com/watch?v=Uho22R0BCHQ&feature=youtu.be]
|
54 |
|
55 |
= Ultimate CSV Importer PRO =
|
56 |
+
CSV Importer PRO has all the features of WP Ultimate CSV Importer and it is extended with a lot of features that enables to import, schedule, update and export CSV files. The import details over a year is in dashboard chart to easily track the site updates in a fraction of a second. Any changes like modifying existing content or appending new content can be done in simple update flow. You can also update or import periodically with scheduler. The update or schedule is done with the templates which is created with mapped fields in the mapping section of the import. The export option enables to export the imported modules as CSV based on the filters.
|
57 |
|
58 |
= Supported Modules To Import and Export =
|
59 |
* Core Module - Post, Page, Custom Post, Comments, Category, Tags, Users, Customer Reviews.
|
76 |
* Imported modules can be managed in the File manager.
|
77 |
* Detailed logs are maintained in the Log manager.
|
78 |
* Duplicate handling with any of the WordPress field.
|
79 |
+
* Import all the supported features of CSV Importer plugin with [Rest API](http://www.smackcoders.com/document/wp-ultimate-csv-importer-rest-api.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org).
|
80 |
* Extendable for your needs with [API](https://www.smackcoders.com/document/docs/api/classes/SmackUCI_API.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org).
|
81 |
|
82 |
= Helpful Links =
|
85 |
Watch our [product video](https://youtu.be/Uho22R0BCHQ)
|
86 |
You can try the [live demo](http://demo.smackcoders.com/wordpress/wp-admin/admin.php?page=sm-uci-dashboard) or request for free trial by clicking Try Now in [WordPress Ultimate CSV Importer](http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org) page to generate your own WordPress test environment.
|
87 |
|
88 |
+
Read our [blog](http://www.smackcoders.com/blog/category/wordpress-products?utm_source=web&utm_campaign=readme&utm_medium=wp_org) to know more about the new [features](http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org) of our WordPress plugins.
|
89 |
|
90 |
[FAQ](http://www.smackcoders.com/wordpress-products-faq.html?utm_source=web&utm_campaign=readme&utm_medium=wp_org) and [Troubleshooting tips](https://wordpress.org/support/topic/tips-to-trouble-shoot-wp-ultimate-csv-importer-issues-1)
|
91 |
|
112 |
* System Requirements are not matched the required values.<br />
|
113 |
|
114 |
2. How to validate a CSV? <br />
|
115 |
+
CSV Importer plugin allows you to import CSVs that are validated. So kindly validate your CSV using CSV Lint. Your CSV may have any escape characters and misplaced skip characters which may cause the import to cease.<br />
|
116 |
|
117 |
3. What are the supported CSV Formats? <br />
|
118 |
+
Wordpress CSV Importer plugin recognizes only the UTF-8 encoded characters. You can check on the UTF-8 encode with CSV Lint. Any chance if you are using Excel, we recommend you to use Google Sheets. Excel will miss some characters to be encoded to proper UTF-8.<br />
|
119 |
|
120 |
4. What are the Minimum Requirements needed to upload CSV? <br />
|
121 |
+
Basic System Requirements need to be met to upload a CSV with bulk of records. Kindly check your System Requirements by Settings → Security and Performance on CSV Importer plugin settings tab. You have to increase the system requirements values to the minimum values mentioned in the plugin. <br />
|
122 |
|
123 |
5. Why my featured images not getting uploaded? <br />
|
124 |
The importer uploads images in the background for faster performance and it requires WP-Cron to be enabled. You can [easily configure WP-Cron](http://www.smackcoders.com/blog/enable-configure-wp-cron.html?utm_source=wp_org&utm_campaign=readme&utm_medium=faq) for smooth and speedy import. <br />
|
129 |
For more FAQ, you can refer [here](http://www.smackcoders.com/wordpress-products-faq.html?utm_source=wp_org&utm_campaign=readme&utm_medium=faq).
|
130 |
|
131 |
== Changelog ==
|
132 |
+
= 5.3 =
|
133 |
+
* Added: Prevent loss of Mapping data
|
134 |
+
* Added: Custom field group plug-in support
|
135 |
+
* Added: Maintenance mode
|
136 |
+
* Added: Inclusion feature
|
137 |
+
* Updated: Exclude selection as include selection in export module
|
138 |
+
* Fixed: User import
|
139 |
+
* Fixed: Delimiter issue
|
140 |
+
* Fixed: Advance Mapping issues
|
141 |
+
* Fixed: Post status in Mapping
|
142 |
+
* Fixed: Featured image in Mapping
|
143 |
+
* Fixed: Post comment in Mapping
|
144 |
+
* Fixed: Export page radio button based on plug-in activation
|
145 |
+
* Fixed: Comment Export
|
146 |
+
* Fixed: Text changes
|
147 |
+
|
148 |
= 5.2 =
|
149 |
* Added: Advance mapping view with Drag ‘n’ Drop support.
|
150 |
* Added: Ultimate member plugin support for Users Import.
|
465 |
* Added featured image import feature along with post/page/custom post.
|
466 |
= 1.0.2 =
|
467 |
* Bug fixed to recognize the trimmed trailing space in the CSV file
|
468 |
+
* Added validation for the duplicate field mapping.
|
469 |
= 1.0.1 =
|
470 |
* Added features to import multiple tags and categories with different delimiters.
|
471 |
= 1.0.0 =
|
472 |
* Initial release version. Tested and found works well without any issues.
|
473 |
|
474 |
== Upgrade Notice ==
|
475 |
+
= 5.3 =
|
476 |
+
* Major improvements and fix updates, verify change log for upgrade.
|
477 |
= 5.2 =
|
478 |
* Upgrade now to get enhanced User Interface and support for latest version of All in one SEO. 2.3.12.1.
|
479 |
= 5.1.1 =
|
admin/class-uci-admin.php
CHANGED
@@ -161,13 +161,18 @@ class SmackUCIAdmin extends SmackUCIHelper {
|
|
161 |
if(empty($parserObj->screenData)):
|
162 |
$parserObj->wp_session = "Your mapping configuration may lost. Please configure your mapping again!";
|
163 |
endif;
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
171 |
break;
|
172 |
}
|
173 |
break;
|
@@ -241,7 +246,7 @@ class SmackUCIAdmin extends SmackUCIHelper {
|
|
241 |
case 'ticket':
|
242 |
$widgets = array('Core Fields', 'WordPress Custom Fields', 'ACF Pro Fields', 'ACF Fields', 'ACF Repeater Fields',
|
243 |
'Types Custom Fields', 'PODS Custom Fields', 'CCTM Custom Fields', 'All-in-One SEO Fields',
|
244 |
-
'Yoast SEO Fields', 'Terms and Taxonomies');
|
245 |
break;
|
246 |
case 'Users':
|
247 |
$widgets = array('Core Fields','WordPress Custom Fields', 'Custom Fields by WP-Members', 'Billing And Shipping Information',
|
@@ -332,10 +337,10 @@ class SmackUCIAdmin extends SmackUCIHelper {
|
|
332 |
if(!empty($active_plugins)) {
|
333 |
foreach($active_plugins as $plugin) {
|
334 |
switch ($plugin) {
|
335 |
-
case 'advanced-custom-fields-pro/acf.php'
|
336 |
$possible_widgets['ACF Pro Fields'] = 'ACF';
|
337 |
break;
|
338 |
-
case 'advanced-custom-fields/acf.php'
|
339 |
/** ACF PRO version 5.3.7 */
|
340 |
$acf_pro_pluginPath = WP_PLUGIN_DIR . '/advanced-custom-fields/pro';
|
341 |
if(is_dir($acf_pro_pluginPath))
|
@@ -343,35 +348,40 @@ class SmackUCIAdmin extends SmackUCIHelper {
|
|
343 |
else
|
344 |
$possible_widgets['ACF Fields'] = 'ACF';
|
345 |
break;
|
346 |
-
case 'acf-repeater/acf-repeater.php'
|
347 |
$possible_widgets['ACF Repeater Fields'] = 'RF';
|
348 |
break;
|
349 |
-
case 'custom-content-type-manager/index.php'
|
350 |
$possible_widgets['CCTM Custom Fields'] = 'CCTM';
|
351 |
break;
|
352 |
-
case 'types/wpcf.php'
|
353 |
$possible_widgets['Types Custom Fields'] = 'TYPES';
|
354 |
break;
|
355 |
-
case 'pods/init.php'
|
356 |
$possible_widgets['PODS Custom Fields'] = 'PODS';
|
357 |
break;
|
358 |
-
case 'all-in-one-seo-pack/all_in_one_seo_pack.php'
|
359 |
$possible_widgets['All-in-One SEO Fields'] = 'AIOSEO';
|
360 |
break;
|
361 |
-
case 'wordpress-seo/wp-seo.php'
|
362 |
$possible_widgets['Yoast SEO Fields'] = 'YOASTSEO';
|
363 |
break;
|
364 |
-
case 'wordpress-seo-premium/wp-seo-premium.php'
|
365 |
$possible_widgets['Yoast SEO Fields'] = 'YOASTSEO';
|
366 |
break;
|
367 |
-
case 'wp-e-commerce-custom-fields/custom-fields.php'
|
368 |
$possible_widgets['WP e-Commerce Custom Fields'] = 'WPECOMMETA';
|
369 |
break;
|
370 |
-
case 'wp-members/wp-members.php'
|
371 |
if($import_type == 'Users') {
|
372 |
$possible_widgets['Custom Fields by WP-Members'] = 'WPMEMBERS';
|
373 |
}
|
374 |
break;
|
|
|
|
|
|
|
|
|
|
|
375 |
case 'woocommerce/woocommerce.php':
|
376 |
case 'marketpress/marketpress.php':
|
377 |
case 'wordpress-ecommerce/marketpress.php':
|
@@ -453,6 +463,9 @@ class SmackUCIAdmin extends SmackUCIHelper {
|
|
453 |
case 'Yoast SEO Fields':
|
454 |
$fields = $this->YoastSEOFields();
|
455 |
break;
|
|
|
|
|
|
|
456 |
case 'Billing And Shipping Information':
|
457 |
$fields = $this->billing_information_for_users();
|
458 |
break;
|
161 |
if(empty($parserObj->screenData)):
|
162 |
$parserObj->wp_session = "Your mapping configuration may lost. Please configure your mapping again!";
|
163 |
endif;
|
164 |
+
if(isset($_REQUEST['mapping_type'])) {
|
165 |
+
$mapping_type = $_REQUEST['mapping_type'];
|
166 |
+
} else {
|
167 |
+
$mapping_type = '';
|
168 |
+
}
|
169 |
+
switch($mapping_type) {
|
170 |
+
case 'advanced':
|
171 |
+
include ( 'views/form-advanced-mapping-configuration.php' );
|
172 |
+
break;
|
173 |
+
case 'normal':
|
174 |
+
default:
|
175 |
+
include ( 'views/form-mapping-configuration.php' );
|
176 |
break;
|
177 |
}
|
178 |
break;
|
246 |
case 'ticket':
|
247 |
$widgets = array('Core Fields', 'WordPress Custom Fields', 'ACF Pro Fields', 'ACF Fields', 'ACF Repeater Fields',
|
248 |
'Types Custom Fields', 'PODS Custom Fields', 'CCTM Custom Fields', 'All-in-One SEO Fields',
|
249 |
+
'Yoast SEO Fields', 'Terms and Taxonomies', 'Custom-Field-Suite Fields');
|
250 |
break;
|
251 |
case 'Users':
|
252 |
$widgets = array('Core Fields','WordPress Custom Fields', 'Custom Fields by WP-Members', 'Billing And Shipping Information',
|
337 |
if(!empty($active_plugins)) {
|
338 |
foreach($active_plugins as $plugin) {
|
339 |
switch ($plugin) {
|
340 |
+
case 'advanced-custom-fields-pro/acf.php':
|
341 |
$possible_widgets['ACF Pro Fields'] = 'ACF';
|
342 |
break;
|
343 |
+
case 'advanced-custom-fields/acf.php':
|
344 |
/** ACF PRO version 5.3.7 */
|
345 |
$acf_pro_pluginPath = WP_PLUGIN_DIR . '/advanced-custom-fields/pro';
|
346 |
if(is_dir($acf_pro_pluginPath))
|
348 |
else
|
349 |
$possible_widgets['ACF Fields'] = 'ACF';
|
350 |
break;
|
351 |
+
case 'acf-repeater/acf-repeater.php':
|
352 |
$possible_widgets['ACF Repeater Fields'] = 'RF';
|
353 |
break;
|
354 |
+
case 'custom-content-type-manager/index.php':
|
355 |
$possible_widgets['CCTM Custom Fields'] = 'CCTM';
|
356 |
break;
|
357 |
+
case 'types/wpcf.php':
|
358 |
$possible_widgets['Types Custom Fields'] = 'TYPES';
|
359 |
break;
|
360 |
+
case 'pods/init.php':
|
361 |
$possible_widgets['PODS Custom Fields'] = 'PODS';
|
362 |
break;
|
363 |
+
case 'all-in-one-seo-pack/all_in_one_seo_pack.php':
|
364 |
$possible_widgets['All-in-One SEO Fields'] = 'AIOSEO';
|
365 |
break;
|
366 |
+
case 'wordpress-seo/wp-seo.php':
|
367 |
$possible_widgets['Yoast SEO Fields'] = 'YOASTSEO';
|
368 |
break;
|
369 |
+
case 'wordpress-seo-premium/wp-seo-premium.php':
|
370 |
$possible_widgets['Yoast SEO Fields'] = 'YOASTSEO';
|
371 |
break;
|
372 |
+
case 'wp-e-commerce-custom-fields/custom-fields.php':
|
373 |
$possible_widgets['WP e-Commerce Custom Fields'] = 'WPECOMMETA';
|
374 |
break;
|
375 |
+
case 'wp-members/wp-members.php':
|
376 |
if($import_type == 'Users') {
|
377 |
$possible_widgets['Custom Fields by WP-Members'] = 'WPMEMBERS';
|
378 |
}
|
379 |
break;
|
380 |
+
// Custom Field Suite Support
|
381 |
+
case 'custom-field-suite/cfs.php':
|
382 |
+
$possible_widgets['Custom-Field-Suite Fields'] = 'CFS';
|
383 |
+
break;
|
384 |
+
// Custom Field Suite Support
|
385 |
case 'woocommerce/woocommerce.php':
|
386 |
case 'marketpress/marketpress.php':
|
387 |
case 'wordpress-ecommerce/marketpress.php':
|
463 |
case 'Yoast SEO Fields':
|
464 |
$fields = $this->YoastSEOFields();
|
465 |
break;
|
466 |
+
case 'Custom-Field-Suite Fields':
|
467 |
+
$fields = $this->CFSFields();
|
468 |
+
break;
|
469 |
case 'Billing And Shipping Information':
|
470 |
$fields = $this->billing_information_for_users();
|
471 |
break;
|
admin/views/form-advanced-mapping-configuration.php
CHANGED
@@ -73,7 +73,8 @@ if(!empty($integrations)) :
|
|
73 |
foreach($integrations as $widget_name => $plugin_file) {
|
74 |
$widget_slug = strtolower( str_replace( ' ', '_', $widget_name ) );
|
75 |
$fields = $uci_admin->get_widget_fields( $widget_name, $import_type, $importAs );
|
76 |
-
$
|
|
|
77 |
}
|
78 |
endif;
|
79 |
# print_r($integrations);
|
@@ -88,7 +89,7 @@ if($istemplate == 'no'){
|
|
88 |
$backlink = esc_url(admin_url() . 'admin.php?page=sm-uci-import&step=suggested_template&eventkey='.$_REQUEST['eventkey']);
|
89 |
$actionURL = esc_url(admin_url() . 'admin.php?page=sm-uci-import&step=media_config&eventkey='.$_REQUEST['eventkey']);
|
90 |
}
|
91 |
-
$templateName = '';
|
92 |
if(isset($_REQUEST['templateid'])) {
|
93 |
$templateInfo = $wpdb->get_results($wpdb->prepare("select templatename, mapping from wp_ultimate_csv_importer_mappingtemplate where id = %d", $_REQUEST['templateid']));
|
94 |
$template_mapping = maybe_unserialize($templateInfo[0]->mapping);
|
@@ -130,8 +131,8 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
130 |
?>
|
131 |
<div class="col-md-6 col-md-offset-3">
|
132 |
<ul class="mapping-switcher">
|
133 |
-
<li class="<?php echo $normal; ?>" onclick="mapping_type('normal');">
|
134 |
-
<li class="<?php echo $advanced; ?>" onclick="mapping_type('advanced');">
|
135 |
</ul>
|
136 |
</div>
|
137 |
|
@@ -146,18 +147,18 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
146 |
<div id="core_fieldstoggle" class="widget_fields panel-body widget_open_field" >
|
147 |
<div class="droppableHolder">
|
148 |
<div class="wp_csv_ftp form-group">
|
149 |
-
<input type="text" placeholder="Drag & drop any element on the right to set the title." name="CORE__post_title" id="CORE__post_title" class="droppable form-control" value="<?php echo $template_mapping['CORE']['post_title']; ?>">
|
150 |
</div>
|
151 |
<div class="wp_csv_ftp form-group">
|
152 |
<!-- <input type="text" placeholder="Content" name="CORE__post_content" id="post_content" class="droppable form-control" value="<?php //echo $template_mapping['CORE']['post_content']; ?>"> -->
|
153 |
-
<textarea id="CORE__post_content" class="droppable post_content" name="CORE__post_content"><?php echo $template_mapping['CORE']['post_content']; ?></textarea>
|
154 |
</div>
|
155 |
<div class="wp_csv_ftp form-group">
|
156 |
<!-- <input type="text" placeholder="Short Description" name="CORE__post_excerpt" id="post_excerpt" class="droppable form-control" value="<?php //echo $template_mapping['CORE']['post_excerpt']; ?>"> -->
|
157 |
-
<textarea class="form-control droppable" name="CORE__post_excerpt" id="CORE__post_excerpt"><?php echo $template_mapping['CORE']['post_excerpt']; ?></textarea>
|
158 |
</div>
|
159 |
<div class="wp_csv_ftp form-group">
|
160 |
-
<input type="text" placeholder="Featured Image" class="form-control droppable" name="CORE__featured_image" id="CORE__featured_image" value="<?php echo $template_mapping['CORE']['featured_image']; ?>">
|
161 |
</div>
|
162 |
</div>
|
163 |
<div class="pull-right">
|
@@ -190,7 +191,7 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
190 |
<div class="droppableHolder">
|
191 |
<?php foreach($available_fields['TERMS'] as $index => $field_info) { ?>
|
192 |
<div class="wp_csv_ftp form-group">
|
193 |
-
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="TERMS__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php echo $template_mapping['TERMS'][$field_info['name']]; ?>">
|
194 |
</div>
|
195 |
<?php } ?>
|
196 |
</div>
|
@@ -214,7 +215,7 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
214 |
foreach ( $fields as $key => $value ) {
|
215 |
foreach ($value as $key1 => $value1) { ?>
|
216 |
<div class="wp_csv_ftp form-group">
|
217 |
-
<input type="text" placeholder="<?php echo $key1; ?>" name="<?php echo $key;?>__<?php echo $value1['name']; ?>" id="<?php echo $value1['name']; ?>" class="droppable form-control" value="<?php echo $template_mapping['CORE'][$value1['name']]; ?>">
|
218 |
</div>
|
219 |
<?php }
|
220 |
}
|
@@ -236,13 +237,13 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
236 |
<div id="wp-memberstoggle" class="widget_fields panel-body" >
|
237 |
<div class="droppableHolder">
|
238 |
<?php
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
?>
|
247 |
</div>
|
248 |
</div>
|
@@ -259,14 +260,14 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
259 |
</div>
|
260 |
<div id="ultimate-membertoggle" class="widget_fields panel-body" >
|
261 |
<div class="droppableHolder">
|
262 |
-
<?php
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
?>
|
271 |
</div>
|
272 |
</div>
|
@@ -284,13 +285,13 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
284 |
<div id="bsitoggle" class="widget_fields panel-body" >
|
285 |
<div class="droppableHolder">
|
286 |
<?php
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
?>
|
295 |
</div>
|
296 |
</div>
|
@@ -337,18 +338,12 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
337 |
$field_row++; ?>
|
338 |
<div class="form-group" id="ACF-row<?php echo $field_row; ?>">
|
339 |
<div class="col-md-10">
|
340 |
-
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="ACF__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php echo $template_mapping['ACF'][ $field_info['name'] ]; ?>">
|
341 |
</div>
|
342 |
<div class="col-md-2"><i class="icon-trash4" onclick='removeRow("ACF-row<?php echo $field_row; ?>")'></i></div>
|
343 |
</div>
|
344 |
<?php }
|
345 |
} ?>
|
346 |
-
<!-- <div class="form-group ">
|
347 |
-
<div class="col-md-10">
|
348 |
-
<input class="form-control droppable" name="ECOMMETA__external_link" type="text">
|
349 |
-
</div>
|
350 |
-
<div class="col-md-2"><i class="icon-trash4"></i></div>
|
351 |
-
</div> -->
|
352 |
</div>
|
353 |
<div class="clearfix"></div>
|
354 |
</div>
|
@@ -362,18 +357,12 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
362 |
$field_row++; ?>
|
363 |
<div class="form-group" id="TYPES-row<?php echo $field_row; ?>">
|
364 |
<div class="col-md-10">
|
365 |
-
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="TYPES__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php echo $template_mapping['TYPES'][ $field_info['name'] ]; ?>">
|
366 |
</div>
|
367 |
<div class="col-md-2"><i class="icon-trash4" onclick='removeRow("TYPES-row<?php echo $field_row; ?>");'></i></div>
|
368 |
</div>
|
369 |
<?php }
|
370 |
} ?>
|
371 |
-
<!-- <div class="form-group ">
|
372 |
-
<div class="col-md-10">
|
373 |
-
<input class="form-control droppable" name="ECOMMETA__external_link"
|
374 |
-
type="text"></div>
|
375 |
-
<div class="col-md-2"><i class="icon-trash4"></i></div>
|
376 |
-
</div> -->
|
377 |
</div>
|
378 |
<div class="clearfix"></div>
|
379 |
</div>
|
@@ -387,16 +376,12 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
387 |
$field_row++; ?>
|
388 |
<div class="form-group" id="PODS-row<?php echo $field_row; ?>">
|
389 |
<div class="col-md-10">
|
390 |
-
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="PODS__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php echo $template_mapping['PODS'][ $field_info['name'] ]; ?>">
|
391 |
</div>
|
392 |
<div class="col-md-2"><i class="icon-trash4" onclick='removeRow("PODS-row<?php echo $field_row; ?>");'></i></div>
|
393 |
</div>
|
394 |
<?php }
|
395 |
} ?>
|
396 |
-
<!-- <div class="col-md-10">
|
397 |
-
<input class="form-control droppable" name="ECOMMETA__external_link"
|
398 |
-
type="text"></div>
|
399 |
-
<div class="col-md-2"><i class="icon-trash4"></i></div> -->
|
400 |
</div>
|
401 |
</div>
|
402 |
<div class="clearfix"></div>
|
@@ -411,18 +396,12 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
411 |
$field_row++; ?>
|
412 |
<div class="form-group" id="CORECUSTFIELDS-row<?php echo $field_row; ?>">
|
413 |
<div class="col-md-10">
|
414 |
-
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="CORECUSTFIELDS__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php echo $template_mapping['CORECUSTFIELDS'][ $field_info['name'] ]; ?>">
|
415 |
</div>
|
416 |
<div class="col-md-2"><i class="icon-trash4" onclick='removeRow("CORECUSTFIELDS-row<?php echo $field_row; ?>");'></i></div>
|
417 |
</div>
|
418 |
<?php }
|
419 |
} ?>
|
420 |
-
<!-- <div class="col-md-8">
|
421 |
-
<input class="form-control droppable" name="ECOMMETA__external_link"
|
422 |
-
type="text"></div>
|
423 |
-
<div class="col-md-2">
|
424 |
-
<input class="form-control" type="checkbox"></div>
|
425 |
-
<div class="col-md-2"><i class="icon-trash4"></i></div> -->
|
426 |
</div>
|
427 |
</div>
|
428 |
<!-- <div class="clearfix"></div> -->
|
@@ -529,7 +508,7 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
529 |
foreach ( $seo_fields as $key => $value ) {
|
530 |
foreach ($value as $key1 => $value1) { ?>
|
531 |
<div class="wp_csv_ftp form-group">
|
532 |
-
<input type="text" placeholder="<?php echo $value1['name']; ?>" name="<?php echo $key;?>__<?php echo $value1['name']; ?>" id="<?php echo $value1['name']; ?>" class="droppable form-control" value="<?php echo $template_mapping[$key][$value1['name']]; ?>">
|
533 |
</div>
|
534 |
<?php }
|
535 |
}
|
@@ -542,7 +521,6 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
542 |
</div>
|
543 |
<?php } ?>
|
544 |
<!-- This widget will be available only for the post types -->
|
545 |
-
<?php #print '<pre>'; print_r(get_post_types()); print '</pre>'; ?>
|
546 |
<?php if(in_array($get_post_type, get_post_types()) && !in_array($get_records[$eventKey]['import_file']['posttype'], $ecommerce_supported_modules)) { ?>
|
547 |
<div class="mapping_widget dropitems col-md-12">
|
548 |
<div class="panel-group" id='accordion'>
|
@@ -557,11 +535,11 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
557 |
<td>
|
558 |
<h6>Post Status</h6>
|
559 |
<div class="form-group wp_ultimate_container">
|
560 |
-
<label class="control-label col-md-12"><input checked="checked" id="post_status_published" data-key="false" class="wp_ultimate_slide" name="CORE__is_post_status" type="radio">Published</label>
|
561 |
-
<label class="control-label col-md-12"><input name="CORE__is_post_status" id="post_status_draft" data-key="false" class="wp_ultimate_slide" type="radio">Draft</label>
|
562 |
<label class="control-label col-md-12"><input name="CORE__is_post_status" id="post_status_csv" data-key="true" class="wp_ultimate_slide" type="radio">Set with CSV</label>
|
563 |
<div class="col-md-8 mt10 set_from_csv source-post_status_csv" style="display: none;">
|
564 |
-
<input type="text" class="form-control droppable" name="CORE__post_status" value="<?php echo $template_mapping['CORE']['post_status']; ?>">
|
565 |
</div>
|
566 |
</div>
|
567 |
<div class="clearfix"></div>
|
@@ -583,7 +561,7 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
583 |
</div>
|
584 |
<label class="control-label col-md-12"><input checked="checked" name="CORE__post_date_option" type="radio">Set with CSV</label> -->
|
585 |
<div class="col-md-4">
|
586 |
-
<input type="text" class="form-control droppable" name="CORE__post_date" value="<?php echo $template_mapping['CORE']['post_date']; ?>">
|
587 |
</div>
|
588 |
</div>
|
589 |
<div class="clearfix"></div>
|
@@ -599,7 +577,7 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
599 |
<label class="control-label col-md-12"><input name="CORE__post_comment_status" id="post_comments_closed" data-key="false" class="wp_ultimate_slide" type="radio" value="closed">Closed</label>
|
600 |
<label class="control-label col-md-12"><input name="CORE__post_comment_status" id="post_comments_csv" data-key="true" class="wp_ultimate_slide" type="radio" value="set_from_csv">Set with CSV</label>
|
601 |
<div class="col-md-8 mt10 set_from_csv source-post_comments_csv" style="display: none;">
|
602 |
-
<input type="text" class="form-control droppable" name="CORE__comment_status" value="<?php echo $template_mapping['CORE']['comment_status']; ?>">
|
603 |
</div>
|
604 |
</div>
|
605 |
<div class="clearfix"></div>
|
@@ -615,7 +593,7 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
615 |
<label class="control-label col-md-12"><input name="CORE__post_ping_status" id="ping_status_closed" data-key="false" class="wp_ultimate_slide" type="radio">Closed</label>
|
616 |
<label class="control-label col-md-12"><input name="CORE__post_ping_status" id="ping_status_csv" data-key="true" class="wp_ultimate_slide" type="radio">Set with CSV</label>
|
617 |
<div class="col-md-8 mt10 set_from_csv source-ping_status_csv" style="display: none;">
|
618 |
-
<input type="text" class="form-control droppable" name="CORE__ping_status" value="<?php echo $template_mapping['CORE']['ping_status']; ?>">
|
619 |
</div>
|
620 |
</div>
|
621 |
<div class="clearfix"></div>
|
@@ -627,7 +605,7 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
627 |
<td>
|
628 |
<h6>Post Slug</h6>
|
629 |
<div class="col-md-8 pl0">
|
630 |
-
<input type="text" name="CORE__post_slug" class="form-control droppable" value="<?php echo $template_mapping['CORE']['post_slug']; ?>" >
|
631 |
</div>
|
632 |
<div class="clearfix"></div>
|
633 |
<hr class="border-bottom-hr no-padding">
|
@@ -638,7 +616,7 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
638 |
<td>
|
639 |
<h6>Post Author</h6>
|
640 |
<div class="col-md-8 pl0">
|
641 |
-
<input type="text" class="form-control droppable" name="CORE__post_author" value="<?php echo $template_mapping['CORE']['post_author']; ?>">
|
642 |
</div>
|
643 |
<div class="col-md-1"><a href="#help" class="vertical-middle" >?</a>
|
644 |
</div>
|
@@ -686,9 +664,9 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
686 |
<label class="control-label col-md-12 pl0"><input id="post_format_audio" value="7" class="wp_ultimate_slide" data-key="false" name="CORE__post_format_option" value="" type="radio">
|
687 |
Audio</label>
|
688 |
<label class="control-label col-md-12 pl0"><input id="post_format_csv" class="wp_ultimate_slide" data-key="true" name="CORE__post_format_option" value="xpath" type="radio">
|
689 |
-
Set with
|
690 |
<div class="set_from_csv source-post_format_csv col-md-8 pl0 mt10" style="display: none;">
|
691 |
-
<input type="text" class="form-control droppable" name="CORE__post_format" value="<?php echo $template_mapping['CORE']['post_format']; ?>">
|
692 |
</div>
|
693 |
</div>
|
694 |
<div class="clearfix"></div>
|
@@ -701,7 +679,7 @@ $ecommerce_module = array('WooCommerce', 'MarketPress', 'WPeCommerce', 'eShop');
|
|
701 |
<td>
|
702 |
<h6>Menu Order</h6>
|
703 |
<div class="col-md-8 pl0">
|
704 |
-
<input type="text" class="form-control droppable" name="CORE__menu_order" value="<?php echo $template_mapping['CORE']['menu_order']; ?>">
|
705 |
</div>
|
706 |
<div class="clearfix"></div>
|
707 |
<hr class="border-bottom-hr no-padding">
|
73 |
foreach($integrations as $widget_name => $plugin_file) {
|
74 |
$widget_slug = strtolower( str_replace( ' ', '_', $widget_name ) );
|
75 |
$fields = $uci_admin->get_widget_fields( $widget_name, $import_type, $importAs );
|
76 |
+
if(!empty($fields[$plugin_file]))
|
77 |
+
$available_fields[$plugin_file] = $fields[$plugin_file];
|
78 |
}
|
79 |
endif;
|
80 |
# print_r($integrations);
|
89 |
$backlink = esc_url(admin_url() . 'admin.php?page=sm-uci-import&step=suggested_template&eventkey='.$_REQUEST['eventkey']);
|
90 |
$actionURL = esc_url(admin_url() . 'admin.php?page=sm-uci-import&step=media_config&eventkey='.$_REQUEST['eventkey']);
|
91 |
}
|
92 |
+
$templateName = ''; $template_mapping = array();
|
93 |
if(isset($_REQUEST['templateid'])) {
|
94 |
$templateInfo = $wpdb->get_results($wpdb->prepare("select templatename, mapping from wp_ultimate_csv_importer_mappingtemplate where id = %d", $_REQUEST['templateid']));
|
95 |
$template_mapping = maybe_unserialize($templateInfo[0]->mapping);
|
131 |
?>
|
132 |
<div class="col-md-6 col-md-offset-3">
|
133 |
<ul class="mapping-switcher">
|
134 |
+
<li class="<?php echo $normal; ?>" onclick="mapping_type('normal');">Advanced Mode</li>
|
135 |
+
<li class="<?php echo $advanced; ?>" onclick="mapping_type('advanced');">Drag & Drop Mode</li>
|
136 |
</ul>
|
137 |
</div>
|
138 |
|
147 |
<div id="core_fieldstoggle" class="widget_fields panel-body widget_open_field" >
|
148 |
<div class="droppableHolder">
|
149 |
<div class="wp_csv_ftp form-group">
|
150 |
+
<input type="text" placeholder="Drag & drop any element on the right to set the title." name="CORE__post_title" id="CORE__post_title" class="droppable form-control" value="<?php if(isset($template_mapping['CORE']['post_title'])) { echo $template_mapping['CORE']['post_title']; } ?>">
|
151 |
</div>
|
152 |
<div class="wp_csv_ftp form-group">
|
153 |
<!-- <input type="text" placeholder="Content" name="CORE__post_content" id="post_content" class="droppable form-control" value="<?php //echo $template_mapping['CORE']['post_content']; ?>"> -->
|
154 |
+
<textarea id="CORE__post_content" class="droppable post_content" name="CORE__post_content"><?php if(isset($template_mapping['CORE']['post_content'])) { echo $template_mapping['CORE']['post_content']; } ?></textarea>
|
155 |
</div>
|
156 |
<div class="wp_csv_ftp form-group">
|
157 |
<!-- <input type="text" placeholder="Short Description" name="CORE__post_excerpt" id="post_excerpt" class="droppable form-control" value="<?php //echo $template_mapping['CORE']['post_excerpt']; ?>"> -->
|
158 |
+
<textarea class="form-control droppable" name="CORE__post_excerpt" id="CORE__post_excerpt"><?php if(isset($template_mapping['CORE']['post_excerpt'])) { echo $template_mapping['CORE']['post_excerpt']; } ?></textarea>
|
159 |
</div>
|
160 |
<div class="wp_csv_ftp form-group">
|
161 |
+
<input type="text" placeholder="Featured Image" class="form-control droppable" name="CORE__featured_image" id="CORE__featured_image" value="<?php if(isset($template_mapping['CORE']['featured_image'])) { echo $template_mapping['CORE']['featured_image']; } ?>">
|
162 |
</div>
|
163 |
</div>
|
164 |
<div class="pull-right">
|
191 |
<div class="droppableHolder">
|
192 |
<?php foreach($available_fields['TERMS'] as $index => $field_info) { ?>
|
193 |
<div class="wp_csv_ftp form-group">
|
194 |
+
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="TERMS__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php if(isset($template_mapping['TERMS'][$field_info['name']])) { echo $template_mapping['TERMS'][$field_info['name']]; } ?>">
|
195 |
</div>
|
196 |
<?php } ?>
|
197 |
</div>
|
215 |
foreach ( $fields as $key => $value ) {
|
216 |
foreach ($value as $key1 => $value1) { ?>
|
217 |
<div class="wp_csv_ftp form-group">
|
218 |
+
<input type="text" placeholder="<?php echo $key1; ?>" name="<?php echo $key;?>__<?php echo $value1['name']; ?>" id="<?php echo $value1['name']; ?>" class="droppable form-control" value="<?php if(isset($template_mapping['CORE'][$value1['name']])) { echo $template_mapping['CORE'][$value1['name']]; } ?>">
|
219 |
</div>
|
220 |
<?php }
|
221 |
}
|
237 |
<div id="wp-memberstoggle" class="widget_fields panel-body" >
|
238 |
<div class="droppableHolder">
|
239 |
<?php
|
240 |
+
if(!empty($available_fields['WPMEMBERS'])) {
|
241 |
+
foreach($available_fields['WPMEMBERS'] as $index => $field_info) { ?>
|
242 |
+
<div class="form-group wp_csv_ftp">
|
243 |
+
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="WPMEMBERS__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php if(isset($template_mapping['WPMEMBERS'][$field_info['name']])) { echo $template_mapping['WPMEMBERS'][$field_info['name']]; } ?>">
|
244 |
+
</div>
|
245 |
+
<?php }
|
246 |
+
}
|
247 |
?>
|
248 |
</div>
|
249 |
</div>
|
260 |
</div>
|
261 |
<div id="ultimate-membertoggle" class="widget_fields panel-body" >
|
262 |
<div class="droppableHolder">
|
263 |
+
<?php
|
264 |
+
if(!empty($available_fields['ULTIMATEMEMBER'])) {
|
265 |
+
foreach($available_fields['ULTIMATEMEMBER'] as $index => $field_info) { ?>
|
266 |
+
<div class="form-group wp_csv_ftp">
|
267 |
+
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="ULTIMATEMEMBER__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php if(isset($template_mapping['ULTIMATEMEMBER'][$field_info['name']])) { echo $template_mapping['ULTIMATEMEMBER'][$field_info['name']]; } ?>">
|
268 |
+
</div>
|
269 |
+
<?php }
|
270 |
+
}
|
271 |
?>
|
272 |
</div>
|
273 |
</div>
|
285 |
<div id="bsitoggle" class="widget_fields panel-body" >
|
286 |
<div class="droppableHolder">
|
287 |
<?php
|
288 |
+
if(!empty($available_fields['BSI'])) {
|
289 |
+
foreach($available_fields['BSI'] as $index => $field_info) { ?>
|
290 |
+
<div class="form-group wp_csv_ftp">
|
291 |
+
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="BSI__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php if(isset($template_mapping['BSI'][$field_info['name']])) { echo $template_mapping['BSI'][$field_info['name']]; } ?>">
|
292 |
+
</div>
|
293 |
+
<?php }
|
294 |
+
}
|
295 |
?>
|
296 |
</div>
|
297 |
</div>
|
338 |
$field_row++; ?>
|
339 |
<div class="form-group" id="ACF-row<?php echo $field_row; ?>">
|
340 |
<div class="col-md-10">
|
341 |
+
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="ACF__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php if(isset($template_mapping['ACF'][ $field_info['name'] ])) { echo $template_mapping['ACF'][ $field_info['name'] ]; } ?>">
|
342 |
</div>
|
343 |
<div class="col-md-2"><i class="icon-trash4" onclick='removeRow("ACF-row<?php echo $field_row; ?>")'></i></div>
|
344 |
</div>
|
345 |
<?php }
|
346 |
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
</div>
|
348 |
<div class="clearfix"></div>
|
349 |
</div>
|
357 |
$field_row++; ?>
|
358 |
<div class="form-group" id="TYPES-row<?php echo $field_row; ?>">
|
359 |
<div class="col-md-10">
|
360 |
+
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="TYPES__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php if(isset($template_mapping['TYPES'][ $field_info['name'] ])) { echo $template_mapping['TYPES'][ $field_info['name'] ]; } ?>">
|
361 |
</div>
|
362 |
<div class="col-md-2"><i class="icon-trash4" onclick='removeRow("TYPES-row<?php echo $field_row; ?>");'></i></div>
|
363 |
</div>
|
364 |
<?php }
|
365 |
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
</div>
|
367 |
<div class="clearfix"></div>
|
368 |
</div>
|
376 |
$field_row++; ?>
|
377 |
<div class="form-group" id="PODS-row<?php echo $field_row; ?>">
|
378 |
<div class="col-md-10">
|
379 |
+
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="PODS__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php if(isset($template_mapping['PODS'][ $field_info['name'] ])) { echo $template_mapping['PODS'][ $field_info['name'] ]; } ?>">
|
380 |
</div>
|
381 |
<div class="col-md-2"><i class="icon-trash4" onclick='removeRow("PODS-row<?php echo $field_row; ?>");'></i></div>
|
382 |
</div>
|
383 |
<?php }
|
384 |
} ?>
|
|
|
|
|
|
|
|
|
385 |
</div>
|
386 |
</div>
|
387 |
<div class="clearfix"></div>
|
396 |
$field_row++; ?>
|
397 |
<div class="form-group" id="CORECUSTFIELDS-row<?php echo $field_row; ?>">
|
398 |
<div class="col-md-10">
|
399 |
+
<input type="text" placeholder="<?php echo $field_info['label']; ?>" name="CORECUSTFIELDS__<?php echo $field_info['name']; ?>" id="post_status" class="droppable form-control" value="<?php if(isset($template_mapping['CORECUSTFIELDS'][ $field_info['name'] ])) { echo $template_mapping['CORECUSTFIELDS'][ $field_info['name'] ]; } ?>">
|
400 |
</div>
|
401 |
<div class="col-md-2"><i class="icon-trash4" onclick='removeRow("CORECUSTFIELDS-row<?php echo $field_row; ?>");'></i></div>
|
402 |
</div>
|
403 |
<?php }
|
404 |
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
</div>
|
406 |
</div>
|
407 |
<!-- <div class="clearfix"></div> -->
|
508 |
foreach ( $seo_fields as $key => $value ) {
|
509 |
foreach ($value as $key1 => $value1) { ?>
|
510 |
<div class="wp_csv_ftp form-group">
|
511 |
+
<input type="text" placeholder="<?php echo $value1['name']; ?>" name="<?php echo $key;?>__<?php echo $value1['name']; ?>" id="<?php echo $value1['name']; ?>" class="droppable form-control" value="<?php if(isset($template_mapping[$key][$value1['name']])) echo $template_mapping[$key][$value1['name']]; ?>">
|
512 |
</div>
|
513 |
<?php }
|
514 |
}
|
521 |
</div>
|
522 |
<?php } ?>
|
523 |
<!-- This widget will be available only for the post types -->
|
|
|
524 |
<?php if(in_array($get_post_type, get_post_types()) && !in_array($get_records[$eventKey]['import_file']['posttype'], $ecommerce_supported_modules)) { ?>
|
525 |
<div class="mapping_widget dropitems col-md-12">
|
526 |
<div class="panel-group" id='accordion'>
|
535 |
<td>
|
536 |
<h6>Post Status</h6>
|
537 |
<div class="form-group wp_ultimate_container">
|
538 |
+
<label class="control-label col-md-12"><input checked="checked" id="post_status_published" data-key="false" class="wp_ultimate_slide" name="CORE__is_post_status" type="radio" value="publish">Published</label>
|
539 |
+
<label class="control-label col-md-12"><input name="CORE__is_post_status" id="post_status_draft" data-key="false" class="wp_ultimate_slide" type="radio" value="draft">Draft</label>
|
540 |
<label class="control-label col-md-12"><input name="CORE__is_post_status" id="post_status_csv" data-key="true" class="wp_ultimate_slide" type="radio">Set with CSV</label>
|
541 |
<div class="col-md-8 mt10 set_from_csv source-post_status_csv" style="display: none;">
|
542 |
+
<input type="text" class="form-control droppable" name="CORE__post_status" value="<?php if(isset($template_mapping['CORE']['post_status'])) echo $template_mapping['CORE']['post_status']; ?>">
|
543 |
</div>
|
544 |
</div>
|
545 |
<div class="clearfix"></div>
|
561 |
</div>
|
562 |
<label class="control-label col-md-12"><input checked="checked" name="CORE__post_date_option" type="radio">Set with CSV</label> -->
|
563 |
<div class="col-md-4">
|
564 |
+
<input type="text" class="form-control droppable" name="CORE__post_date" value="<?php if(isset($template_mapping['CORE']['post_date'])) echo $template_mapping['CORE']['post_date']; ?>">
|
565 |
</div>
|
566 |
</div>
|
567 |
<div class="clearfix"></div>
|
577 |
<label class="control-label col-md-12"><input name="CORE__post_comment_status" id="post_comments_closed" data-key="false" class="wp_ultimate_slide" type="radio" value="closed">Closed</label>
|
578 |
<label class="control-label col-md-12"><input name="CORE__post_comment_status" id="post_comments_csv" data-key="true" class="wp_ultimate_slide" type="radio" value="set_from_csv">Set with CSV</label>
|
579 |
<div class="col-md-8 mt10 set_from_csv source-post_comments_csv" style="display: none;">
|
580 |
+
<input type="text" class="form-control droppable" name="CORE__comment_status" value="<?php if(isset($template_mapping['CORE']['comment_status'])) echo $template_mapping['CORE']['comment_status']; ?>">
|
581 |
</div>
|
582 |
</div>
|
583 |
<div class="clearfix"></div>
|
593 |
<label class="control-label col-md-12"><input name="CORE__post_ping_status" id="ping_status_closed" data-key="false" class="wp_ultimate_slide" type="radio">Closed</label>
|
594 |
<label class="control-label col-md-12"><input name="CORE__post_ping_status" id="ping_status_csv" data-key="true" class="wp_ultimate_slide" type="radio">Set with CSV</label>
|
595 |
<div class="col-md-8 mt10 set_from_csv source-ping_status_csv" style="display: none;">
|
596 |
+
<input type="text" class="form-control droppable" name="CORE__ping_status" value="<?php if(isset($template_mapping['CORE']['ping_status'])) echo $template_mapping['CORE']['ping_status']; ?>">
|
597 |
</div>
|
598 |
</div>
|
599 |
<div class="clearfix"></div>
|
605 |
<td>
|
606 |
<h6>Post Slug</h6>
|
607 |
<div class="col-md-8 pl0">
|
608 |
+
<input type="text" name="CORE__post_slug" class="form-control droppable" value="<?php if(isset($template_mapping['CORE']['post_slug'])) echo $template_mapping['CORE']['post_slug']; ?>" >
|
609 |
</div>
|
610 |
<div class="clearfix"></div>
|
611 |
<hr class="border-bottom-hr no-padding">
|
616 |
<td>
|
617 |
<h6>Post Author</h6>
|
618 |
<div class="col-md-8 pl0">
|
619 |
+
<input type="text" class="form-control droppable" name="CORE__post_author" value="<?php if(isset($template_mapping['CORE']['post_author'])) echo $template_mapping['CORE']['post_author']; ?>">
|
620 |
</div>
|
621 |
<div class="col-md-1"><a href="#help" class="vertical-middle" >?</a>
|
622 |
</div>
|
664 |
<label class="control-label col-md-12 pl0"><input id="post_format_audio" value="7" class="wp_ultimate_slide" data-key="false" name="CORE__post_format_option" value="" type="radio">
|
665 |
Audio</label>
|
666 |
<label class="control-label col-md-12 pl0"><input id="post_format_csv" class="wp_ultimate_slide" data-key="true" name="CORE__post_format_option" value="xpath" type="radio">
|
667 |
+
Set with CSV</label>
|
668 |
<div class="set_from_csv source-post_format_csv col-md-8 pl0 mt10" style="display: none;">
|
669 |
+
<input type="text" class="form-control droppable" name="CORE__post_format" value="<?php if(isset($template_mapping['CORE']['post_format'])) echo $template_mapping['CORE']['post_format']; ?>">
|
670 |
</div>
|
671 |
</div>
|
672 |
<div class="clearfix"></div>
|
679 |
<td>
|
680 |
<h6>Menu Order</h6>
|
681 |
<div class="col-md-8 pl0">
|
682 |
+
<input type="text" class="form-control droppable" name="CORE__menu_order" value="<?php if(isset($template_mapping['CORE']['menu_order'])) echo $template_mapping['CORE']['menu_order']; ?>">
|
683 |
</div>
|
684 |
<div class="clearfix"></div>
|
685 |
<hr class="border-bottom-hr no-padding">
|
admin/views/form-export-data.php
CHANGED
@@ -52,7 +52,47 @@ if(is_array( $exportAs )) {
|
|
52 |
$exportAs = $exportAs[$module];
|
53 |
}
|
54 |
$exportType = 'csv';
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
?>
|
57 |
<div id='wp_warning' style = 'display:none;' class = 'error'></div>
|
58 |
<?php if(!isset($_REQUEST['exportType'])) { ?>
|
@@ -69,11 +109,11 @@ $exportType = 'csv';
|
|
69 |
<th colspan='2'><label class='h-exportmodule csv-importer-heading'><h3 id="innertitle"><?php echo esc_html__('Select your module to export the data','wp-ultimate-csv-importer')?> </h3></label></th>
|
70 |
<tr>
|
71 |
<td class='exportdatatype'><label> <input type="radio" name="export_type" value="Posts"><span id="align"><?php echo esc_html__('Post','wp-ultimate-csv-importer'); ?></span> </label></td>
|
72 |
-
<td class='exportdatatype'><label> <input type="radio" name="export_type" value="eShop"><span id="align"><?php echo esc_html__('Eshop','wp-ultimate-csv-importer'); ?></span> </label></td>
|
73 |
</tr>
|
74 |
<tr>
|
75 |
<td class='exportdatatype'><label> <input type="radio" name="export_type" value="Pages"><span id="align"> <?php echo esc_html__('Page','wp-ultimate-csv-importer'); ?></span> </label></td>
|
76 |
-
<td class='exportdatatype'><label> <input type="radio" name="export_type" value="WPeCommerce"><span id="align"> <?php echo esc_html__('Wp-Commerce','wp-ultimate-csv-importer'); ?></span></label></td>
|
77 |
</tr>
|
78 |
<tr>
|
79 |
<td class='exportdatatype' style="">
|
@@ -91,15 +131,15 @@ $exportType = 'csv';
|
|
91 |
?>
|
92 |
</select>
|
93 |
</td>
|
94 |
-
<td class='exportdatatype'><label><input type="radio" name="export_type" value="WooCommerce"><span id="align"> <?php echo esc_html__('Woo-Commerce','wp-ultimate-csv-importer'); ?></span></label></td>
|
95 |
</tr>
|
96 |
<tr>
|
97 |
<td class='exportdatatype'><label><input type="radio" name="export_type" value="Categories"><span id="align"> <?php echo esc_html__('Category','wp-ultimate-csv-importer'); ?></span></label></td>
|
98 |
-
<td class='exportdatatype'><label><input type="radio" name="export_type" value="MarketPress"><span id="align"> <?php echo esc_html__('Marketpress','wp-ultimate-csv-importer'); ?></span></label></td>
|
99 |
</tr>
|
100 |
<tr>
|
101 |
<td class='exportdatatype'><label><input type="radio" id="tags_id" name="export_type" value="Tags"><span id="align"> <?php echo esc_html__('Tags','wp-ultimate-csv-importer'); ?> </label></span></td>
|
102 |
-
<td class='exportdatatype'><label> <input type="radio" name="export_type" value="CustomerReviews"><span id="align"> <?php echo esc_html__('Customer Reviews','wp-ultimate-csv-importer'); ?></span></label></td>
|
103 |
</tr>
|
104 |
<tr>
|
105 |
<td class='exportdatatype' style="">
|
@@ -225,7 +265,7 @@ if($exportType) :
|
|
225 |
</p>
|
226 |
<?php } ?>
|
227 |
<p>
|
228 |
-
<label class="media_styles"><input type='checkbox' name='getdatabasedonexclusions' id='getdatabasedonexclusions' value='getdatabasedonexclusions' onclick='addexportfilter(this.id);' /><span id="align"> <?php echo esc_html__('Export data based on specific
|
229 |
<div id="exclusiongrouplist" style="display:none;">
|
230 |
<?php
|
231 |
$shortLabel = $shortName = '';
|
52 |
$exportAs = $exportAs[$module];
|
53 |
}
|
54 |
$exportType = 'csv';
|
55 |
+
$active_plugins = get_option('active_plugins');
|
56 |
+
if( in_array( "woocommerce/woocommerce.php", $active_plugins) ) {
|
57 |
+
$woo_dis = "";
|
58 |
+
$woo_text = "";
|
59 |
+
}
|
60 |
+
else{
|
61 |
+
$woo_dis = "disabled='disabled'";
|
62 |
+
$woo_text = "title='WooCommerce is not activated'";
|
63 |
+
}
|
64 |
+
if( in_array( "eshop/eshop.php", $active_plugins) ) {
|
65 |
+
$eshop_dis = "";
|
66 |
+
$eshop_text = "";
|
67 |
+
}
|
68 |
+
else{
|
69 |
+
$eshop_dis = "disabled='disabled'";
|
70 |
+
$eshop_text = "title='Eshop is not activated'";
|
71 |
+
}
|
72 |
+
if( in_array( "wp-e-commerce/wp-shopping-cart.php", $active_plugins) ) {
|
73 |
+
$wpcom_dis = "";
|
74 |
+
$wpcom_text = "";
|
75 |
+
}
|
76 |
+
else{
|
77 |
+
$wpcom_dis = "disabled='disabled'";
|
78 |
+
$wpcom_text = "title='Wp-Commerce is not activated'";
|
79 |
+
}
|
80 |
+
if( in_array( "wordpress-ecommerce/marketpress.php", $active_plugins) || in_array( "marketpress/marketpress.php", $active_plugins) ) {
|
81 |
+
$market_dis = "";
|
82 |
+
$market_text = "";
|
83 |
+
}
|
84 |
+
else{
|
85 |
+
$market_dis = "disabled='disabled'";
|
86 |
+
$market_text = "title='MarketPress is not activated'";
|
87 |
+
}
|
88 |
+
if( in_array("wp-customer-reviews/wp-customer-reviews-3.php", $active_plugins) || in_array("wp-customer-reviews/wp-customer-reviews.php", $active_plugins) ) {
|
89 |
+
$cusre_dis = "";
|
90 |
+
$cusre_text = "";
|
91 |
+
}
|
92 |
+
else{
|
93 |
+
$cusre_dis = "disabled='disabled'";
|
94 |
+
$cusre_text = "title='CustomerReviews is not activated'";
|
95 |
+
}
|
96 |
?>
|
97 |
<div id='wp_warning' style = 'display:none;' class = 'error'></div>
|
98 |
<?php if(!isset($_REQUEST['exportType'])) { ?>
|
109 |
<th colspan='2'><label class='h-exportmodule csv-importer-heading'><h3 id="innertitle"><?php echo esc_html__('Select your module to export the data','wp-ultimate-csv-importer')?> </h3></label></th>
|
110 |
<tr>
|
111 |
<td class='exportdatatype'><label> <input type="radio" name="export_type" value="Posts"><span id="align"><?php echo esc_html__('Post','wp-ultimate-csv-importer'); ?></span> </label></td>
|
112 |
+
<td class='exportdatatype' <?php echo $eshop_text; ?> ><label> <input type="radio" name="export_type" <?php echo $eshop_dis; ?> value="eShop"><span id="align"><?php echo esc_html__('Eshop','wp-ultimate-csv-importer'); ?></span> </label></td>
|
113 |
</tr>
|
114 |
<tr>
|
115 |
<td class='exportdatatype'><label> <input type="radio" name="export_type" value="Pages"><span id="align"> <?php echo esc_html__('Page','wp-ultimate-csv-importer'); ?></span> </label></td>
|
116 |
+
<td class='exportdatatype' <?php echo $wpcom_text; ?> ><label> <input type="radio" name="export_type" <?php echo $wpcom_dis; ?> value="WPeCommerce"><span id="align"> <?php echo esc_html__('Wp-Commerce','wp-ultimate-csv-importer'); ?></span></label></td>
|
117 |
</tr>
|
118 |
<tr>
|
119 |
<td class='exportdatatype' style="">
|
131 |
?>
|
132 |
</select>
|
133 |
</td>
|
134 |
+
<td class='exportdatatype' <?php echo $woo_text; ?> ><label><input type="radio" name="export_type" <?php echo $woo_dis; ?> value="WooCommerce"><span id="align"> <?php echo esc_html__('Woo-Commerce','wp-ultimate-csv-importer'); ?></span></label></td>
|
135 |
</tr>
|
136 |
<tr>
|
137 |
<td class='exportdatatype'><label><input type="radio" name="export_type" value="Categories"><span id="align"> <?php echo esc_html__('Category','wp-ultimate-csv-importer'); ?></span></label></td>
|
138 |
+
<td class='exportdatatype' <?php echo $market_text; ?> ><label><input type="radio" name="export_type" <?php echo $market_dis; ?> value="MarketPress"><span id="align"> <?php echo esc_html__('Marketpress','wp-ultimate-csv-importer'); ?></span></label></td>
|
139 |
</tr>
|
140 |
<tr>
|
141 |
<td class='exportdatatype'><label><input type="radio" id="tags_id" name="export_type" value="Tags"><span id="align"> <?php echo esc_html__('Tags','wp-ultimate-csv-importer'); ?> </label></span></td>
|
142 |
+
<td class='exportdatatype' <?php echo $cusre_text; ?> ><label> <input type="radio" name="export_type" <?php echo $cusre_dis; ?> value="CustomerReviews"><span id="align"> <?php echo esc_html__('Customer Reviews','wp-ultimate-csv-importer'); ?></span></label></td>
|
143 |
</tr>
|
144 |
<tr>
|
145 |
<td class='exportdatatype' style="">
|
265 |
</p>
|
266 |
<?php } ?>
|
267 |
<p>
|
268 |
+
<label class="media_styles"><input type='checkbox' name='getdatabasedonexclusions' id='getdatabasedonexclusions' value='getdatabasedonexclusions' onclick='addexportfilter(this.id);' /><span id="align"> <?php echo esc_html__('Export data based on specific inclusions','wp-ultimate-csv-importer');?> </span></label>
|
269 |
<div id="exclusiongrouplist" style="display:none;">
|
270 |
<?php
|
271 |
$shortLabel = $shortName = '';
|
admin/views/form-file-import-method.php
CHANGED
@@ -37,9 +37,18 @@
|
|
37 |
|
38 |
if ( ! defined( 'ABSPATH' ) )
|
39 |
exit; // Exit if accessed directly
|
|
|
|
|
40 |
?>
|
41 |
<div class="whole_body wp_ultimate_csv_importer_pro">
|
42 |
<form class="form-horizontal" id="form_import_file" method="post" action= "<?php echo esc_url(admin_url() . 'admin.php?page=sm-uci-import&step=suggested_template');?>" enctype="multipart/form-data">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
<div id='wp_warning' style = 'display:none;' class = 'error'></div>
|
44 |
<input type='hidden' id="siteurl" value="<?php echo site_url(); ?>" />
|
45 |
<!-- Code Added For POP UP Starts here -->
|
37 |
|
38 |
if ( ! defined( 'ABSPATH' ) )
|
39 |
exit; // Exit if accessed directly
|
40 |
+
$ucisettings = get_option('sm_uci_pro_settings');
|
41 |
+
$main_mode = isset($ucisettings['enable_main_mode']) ? $ucisettings['enable_main_mode'] : '';
|
42 |
?>
|
43 |
<div class="whole_body wp_ultimate_csv_importer_pro">
|
44 |
<form class="form-horizontal" id="form_import_file" method="post" action= "<?php echo esc_url(admin_url() . 'admin.php?page=sm-uci-import&step=suggested_template');?>" enctype="multipart/form-data">
|
45 |
+
<div id='wp_warning_main' class = 'updated notice'>
|
46 |
+
<p>Supported file types .csv .zip .txt
|
47 |
+
</p></div>
|
48 |
+
|
49 |
+
<?php if($main_mode == 'on') { ?>
|
50 |
+
<div id='wp_warning_main' style = 'margin-top: 10px;font-size: 15px;color: red;' class = 'error' > Maintenance mode is enabled. <a style="cursor: pointer;" onclick="saveoptions('main_check_import_off', 'off')"> Disable </a> </div>
|
51 |
+
<?php } ?>
|
52 |
<div id='wp_warning' style = 'display:none;' class = 'error'></div>
|
53 |
<input type='hidden' id="siteurl" value="<?php echo site_url(); ?>" />
|
54 |
<!-- Code Added For POP UP Starts here -->
|
admin/views/form-ignite-import.php
CHANGED
@@ -59,6 +59,11 @@ $total_row_count = $parserObj->total_row_cont - 1;
|
|
59 |
$get_upload_url = wp_upload_dir();
|
60 |
$uploadLogURL = $get_upload_url['baseurl'] . '/smack_uci_uploads/imports/'. $eventkey . '/' . $eventkey;
|
61 |
$logfilename = $uploadLogURL.".log";
|
|
|
|
|
|
|
|
|
|
|
62 |
?>
|
63 |
<div class="list-inline pull-right mb10 wp_ultimate_csv_importer_pro">
|
64 |
<div class="col-md-6 mt10"><a href="https://goo.gl/jdPMW8" target="_blank"><?php echo esc_html__('Documentation','wp-ultimate-csv-importer');?></a></div>
|
@@ -71,7 +76,7 @@ $logfilename = $uploadLogURL.".log";
|
|
71 |
<div class="col-md-12 mt40" style="text-align: center;">
|
72 |
<input type="button" class="smack-btn smack-btn-primary btn-radius" value="<?php echo esc_attr('Resume','wp-ultimate-csv-importer');?>" style="display:none;" id="continue_import" onclick="continueImport();" >
|
73 |
<input type="button" class="smack-btn smack-btn-danger btn-radius" value="<?php echo esc_attr('Pause','wp-ultimate-csv-importer');?>" id="terminate_now" onclick="terminateImport()">
|
74 |
-
<input type="button" class="smack-btn smack-btn-danger btn-radius" value="<?php echo esc_attr('
|
75 |
</div></div>
|
76 |
<div class="clearfix"></div>
|
77 |
<!-- <input type="button" class="smack-btn smack-btn-primary btn-radius import_config_btn" id="ignite_import" name="ignite_import" value="Confirm-Import" onclick="igniteImport();"> -->
|
@@ -121,6 +126,8 @@ $logfilename = $uploadLogURL.".log";
|
|
121 |
<input type="hidden" id="skipped" value="0" >
|
122 |
<input type="hidden" id="totalcount" name="totalcount" value = "<?php echo $total_row_count;?>">
|
123 |
<input type="hidden" id="terminate_action" name="terminate_action" value="<?php echo esc_html__('continue','wp-ultimate-csv-importer');?>" />
|
|
|
|
|
124 |
</form>
|
125 |
</div>
|
126 |
<script>
|
59 |
$get_upload_url = wp_upload_dir();
|
60 |
$uploadLogURL = $get_upload_url['baseurl'] . '/smack_uci_uploads/imports/'. $eventkey . '/' . $eventkey;
|
61 |
$logfilename = $uploadLogURL.".log";
|
62 |
+
$ucisettings = get_option('sm_uci_pro_settings');
|
63 |
+
$main_mode = isset($_POST['main_mode_config']) ? $_POST['main_mode_config'] : '';
|
64 |
+
if($main_mode == 'on'){
|
65 |
+
$uci_admin->updateMaintenance('on');
|
66 |
+
}
|
67 |
?>
|
68 |
<div class="list-inline pull-right mb10 wp_ultimate_csv_importer_pro">
|
69 |
<div class="col-md-6 mt10"><a href="https://goo.gl/jdPMW8" target="_blank"><?php echo esc_html__('Documentation','wp-ultimate-csv-importer');?></a></div>
|
76 |
<div class="col-md-12 mt40" style="text-align: center;">
|
77 |
<input type="button" class="smack-btn smack-btn-primary btn-radius" value="<?php echo esc_attr('Resume','wp-ultimate-csv-importer');?>" style="display:none;" id="continue_import" onclick="continueImport();" >
|
78 |
<input type="button" class="smack-btn smack-btn-danger btn-radius" value="<?php echo esc_attr('Pause','wp-ultimate-csv-importer');?>" id="terminate_now" onclick="terminateImport()">
|
79 |
+
<input type="button" class="smack-btn smack-btn-danger btn-radius" value="<?php echo esc_attr('Verify import and Close','wp-ultimate-csv-importer');?>" id="new_import" onclick="reload_to_new_import()" style="display: none;">
|
80 |
</div></div>
|
81 |
<div class="clearfix"></div>
|
82 |
<!-- <input type="button" class="smack-btn smack-btn-primary btn-radius import_config_btn" id="ignite_import" name="ignite_import" value="Confirm-Import" onclick="igniteImport();"> -->
|
126 |
<input type="hidden" id="skipped" value="0" >
|
127 |
<input type="hidden" id="totalcount" name="totalcount" value = "<?php echo $total_row_count;?>">
|
128 |
<input type="hidden" id="terminate_action" name="terminate_action" value="<?php echo esc_html__('continue','wp-ultimate-csv-importer');?>" />
|
129 |
+
<input type="hidden" name="main_mode" id="main_mode" value="<?php echo $main_mode; ?>">
|
130 |
+
|
131 |
</form>
|
132 |
</div>
|
133 |
<script>
|
admin/views/form-import-configuration.php
CHANGED
@@ -63,7 +63,16 @@ $backlink = esc_url(admin_url() . 'admin.php?page=sm-uci-import&step=media_confi
|
|
63 |
if(isset($_REQUEST['templateid'])) {
|
64 |
$actionURL .= '&templateid=' . intval($_REQUEST['templateid']);
|
65 |
$backlink .= '&templateid=' . intval($_REQUEST['templateid']);
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
<div class="list-inline pull-right mb10 wp_ultimate_csv_importer_pro">
|
68 |
<div class="col-md-6 mt10"><a href="https://goo.gl/jdPMW8" target="_blank"><?php echo esc_html__('Documentation','wp-ultimate-csv-importer');?></a></div>
|
69 |
<div class="col-md-6 mt10"><a href="https://goo.gl/fKvDxH" target="_blank"><?php echo esc_html__('Sample CSV','wp-ultimate-csv-importer');?></a></div>
|
@@ -74,7 +83,11 @@ if(isset($_REQUEST['templateid'])) {
|
|
74 |
<form class="form-inline" method="post" action="<?php echo $actionURL;?>">
|
75 |
<div id='wp_warning' style = 'display:none;' class = 'error'></div>
|
76 |
<div class="config_table">
|
77 |
-
|
|
|
|
|
|
|
|
|
78 |
<div class="col-md-12 mb15">
|
79 |
<label style="display:inline;">
|
80 |
<input type="checkbox" name="duplicate" id="duplicate" class="import_config_checkbox" onclick = "toggle_configdetails(this.id);" /><?php echo esc_html__('Do you want to handle the duplicate on existing records ?','wp-ultimate-csv-importer');?></label></div>
|
@@ -102,6 +115,7 @@ if(isset($_REQUEST['templateid'])) {
|
|
102 |
<div class="col-md-12 mb15">
|
103 |
<label><input type = "checkbox" class="import_config_checkbox" name = "schedule" id = "schedule" onclick = "toggle_configdetails(this.id);"><?php echo esc_html__('Do you want to Schedule this Import');?></label></div>
|
104 |
</div>
|
|
|
105 |
</div>
|
106 |
<input type="hidden" id="eventkey" value="<?php echo sanitize_key($_REQUEST['eventkey']);?>">
|
107 |
<input type="hidden" id="import_type" value="<?php echo $import_type;?>">
|
@@ -111,8 +125,8 @@ if(isset($_REQUEST['templateid'])) {
|
|
111 |
<a class="smack-btn btn-default btn-radius" href="<?php echo $backlink;?>"><?php echo esc_html__('Back','wp-ultimate-csv-importer');?></a>
|
112 |
</div>
|
113 |
<div class="pull-right mb20" style="margin-top: -10px;">
|
114 |
-
<input type="submit" class="smack-btn smack-btn-primary btn-radius" id="ignite_import" name="ignite_import" value="<?php echo esc_attr__('
|
115 |
-
<input style="display:none;" disabled="disabled" type="button" class="smack-btn smack-btn-primary btn-radius" id="schedule_import_btn" name="schedule_import" value="<?php echo esc_attr__('Schedule
|
116 |
</div>
|
117 |
<div class="clearfix"></div>
|
118 |
</form>
|
@@ -121,5 +135,6 @@ if(isset($_REQUEST['templateid'])) {
|
|
121 |
<?php if($import_mode != '') { ?>
|
122 |
<script type="application/javascript">
|
123 |
// swal('Warning!', 'Please upgrade to PRO for duplicate handling.', 'warning')
|
|
|
124 |
</script>
|
125 |
-
<?php } ?>
|
63 |
if(isset($_REQUEST['templateid'])) {
|
64 |
$actionURL .= '&templateid=' . intval($_REQUEST['templateid']);
|
65 |
$backlink .= '&templateid=' . intval($_REQUEST['templateid']);
|
66 |
+
}
|
67 |
+
$ucisettings = get_option('sm_uci_pro_settings');
|
68 |
+
$main_mode = isset($ucisettings['enable_main_mode']) ? $ucisettings['enable_main_mode'] : '';
|
69 |
+
if($main_mode == 'on'){
|
70 |
+
$config_checkbox = "checked = 'checked'";
|
71 |
+
}
|
72 |
+
else{
|
73 |
+
$config_checkbox = "";
|
74 |
+
}
|
75 |
+
?>
|
76 |
<div class="list-inline pull-right mb10 wp_ultimate_csv_importer_pro">
|
77 |
<div class="col-md-6 mt10"><a href="https://goo.gl/jdPMW8" target="_blank"><?php echo esc_html__('Documentation','wp-ultimate-csv-importer');?></a></div>
|
78 |
<div class="col-md-6 mt10"><a href="https://goo.gl/fKvDxH" target="_blank"><?php echo esc_html__('Sample CSV','wp-ultimate-csv-importer');?></a></div>
|
83 |
<form class="form-inline" method="post" action="<?php echo $actionURL;?>">
|
84 |
<div id='wp_warning' style = 'display:none;' class = 'error'></div>
|
85 |
<div class="config_table">
|
86 |
+
<div class="col-md-12 mt20" id="main_ch">
|
87 |
+
<div class="col-md-12 mb15">
|
88 |
+
<label><input type = "checkbox" class="import_config_checkbox" name = "main_mode_config" id = "main_mode_config" <?php echo $config_checkbox; ?> ><?php echo esc_html__('Do you want to SWITCH ON Maintenance mode while import ?');?></label></div>
|
89 |
+
</div>
|
90 |
+
<div class="col-md-12 mt20">
|
91 |
<div class="col-md-12 mb15">
|
92 |
<label style="display:inline;">
|
93 |
<input type="checkbox" name="duplicate" id="duplicate" class="import_config_checkbox" onclick = "toggle_configdetails(this.id);" /><?php echo esc_html__('Do you want to handle the duplicate on existing records ?','wp-ultimate-csv-importer');?></label></div>
|
115 |
<div class="col-md-12 mb15">
|
116 |
<label><input type = "checkbox" class="import_config_checkbox" name = "schedule" id = "schedule" onclick = "toggle_configdetails(this.id);"><?php echo esc_html__('Do you want to Schedule this Import');?></label></div>
|
117 |
</div>
|
118 |
+
|
119 |
</div>
|
120 |
<input type="hidden" id="eventkey" value="<?php echo sanitize_key($_REQUEST['eventkey']);?>">
|
121 |
<input type="hidden" id="import_type" value="<?php echo $import_type;?>">
|
125 |
<a class="smack-btn btn-default btn-radius" href="<?php echo $backlink;?>"><?php echo esc_html__('Back','wp-ultimate-csv-importer');?></a>
|
126 |
</div>
|
127 |
<div class="pull-right mb20" style="margin-top: -10px;">
|
128 |
+
<input type="submit" class="smack-btn smack-btn-primary btn-radius" id="ignite_import" name="ignite_import" value="<?php echo esc_attr__('Import','wp-ultimate-csv-importer');?>" onsubmit="schedule_rightnow();">
|
129 |
+
<input style="display:none;" disabled="disabled" type="button" class="smack-btn smack-btn-primary btn-radius" id="schedule_import_btn" name="schedule_import" value="<?php echo esc_attr__('Schedule','wp-ultimate-csv-importer');?>" onclick="igniteSchedule();"></div>
|
130 |
</div>
|
131 |
<div class="clearfix"></div>
|
132 |
</form>
|
135 |
<?php if($import_mode != '') { ?>
|
136 |
<script type="application/javascript">
|
137 |
// swal('Warning!', 'Please upgrade to PRO for duplicate handling.', 'warning')
|
138 |
+
|
139 |
</script>
|
140 |
+
<?php } ?>
|
admin/views/form-mapping-configuration.php
CHANGED
@@ -59,6 +59,9 @@ if($_POST) {
|
|
59 |
$eventKey = sanitize_key($_REQUEST['eventkey']);
|
60 |
$get_records = $uci_admin->GetPostValues($eventKey);
|
61 |
$import_type = $get_records[$eventKey]['import_file']['posttype'];
|
|
|
|
|
|
|
62 |
$file = SM_UCI_IMPORT_DIR . '/' . $eventKey . '/' . $eventKey;
|
63 |
$parserObj->parseCSV($file, 0, -1);
|
64 |
$Headers = $parserObj->get_CSVheaders();
|
@@ -97,8 +100,8 @@ if(isset($_REQUEST['mapping_type']) && $_REQUEST['mapping_type'] == 'normal') {
|
|
97 |
?>
|
98 |
<div class="col-md-6 col-md-offset-3">
|
99 |
<ul class="mapping-switcher">
|
100 |
-
<li class="<?php echo $normal; ?>" onclick="mapping_type('normal');">
|
101 |
-
<li class="<?php echo $advanced; ?>" onclick="mapping_type('advanced');">
|
102 |
</ul>
|
103 |
</div>
|
104 |
<div class="clearfix"></div>
|
@@ -174,6 +177,13 @@ if(isset($_REQUEST['mapping_type']) && $_REQUEST['mapping_type'] == 'normal') {
|
|
174 |
} ?>
|
175 |
<option value="<?php echo $csvheader; ?>" <?php echo $mapping_selected;?>> <?php echo $csvheader; ?> </option>
|
176 |
<?php } else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
if($name == $csvheader) {?>
|
178 |
<option value="<?php print($csvheader); ?>" selected><?php print($csvheader); ?> </option>
|
179 |
<?php
|
@@ -269,7 +279,7 @@ if(isset($_REQUEST['mapping_type']) && $_REQUEST['mapping_type'] == 'normal') {
|
|
269 |
</div>
|
270 |
<div class="clearfix"></div>
|
271 |
<div class="mb20"></div>
|
272 |
-
<input type="hidden" name="smack_uci_mapping_method" value="<?php echo sanitize_title($_REQUEST['mapping_type']); ?>">
|
273 |
|
274 |
</form>
|
275 |
</div>
|
59 |
$eventKey = sanitize_key($_REQUEST['eventkey']);
|
60 |
$get_records = $uci_admin->GetPostValues($eventKey);
|
61 |
$import_type = $get_records[$eventKey]['import_file']['posttype'];
|
62 |
+
if(!empty($get_records[$eventKey]['mapping_config']) && $get_records[$eventKey]['mapping_config']) {
|
63 |
+
$mapping_screendata = $uci_admin->get_mapping_screendata( $import_type, $get_records[$eventKey]['mapping_config']);
|
64 |
+
}
|
65 |
$file = SM_UCI_IMPORT_DIR . '/' . $eventKey . '/' . $eventKey;
|
66 |
$parserObj->parseCSV($file, 0, -1);
|
67 |
$Headers = $parserObj->get_CSVheaders();
|
100 |
?>
|
101 |
<div class="col-md-6 col-md-offset-3">
|
102 |
<ul class="mapping-switcher">
|
103 |
+
<li class="<?php echo $normal; ?>" onclick="mapping_type('normal');">Advanced Mode</li>
|
104 |
+
<li class="<?php echo $advanced; ?>" onclick="mapping_type('advanced');">Drag & Drop Mode</li>
|
105 |
</ul>
|
106 |
</div>
|
107 |
<div class="clearfix"></div>
|
177 |
} ?>
|
178 |
<option value="<?php echo $csvheader; ?>" <?php echo $mapping_selected;?>> <?php echo $csvheader; ?> </option>
|
179 |
<?php } else {
|
180 |
+
if(!empty($mapping_screendata[$key])){
|
181 |
+
if(array_key_exists($name,$mapping_screendata[$key]) && $csvheader == $mapping_screendata[$key][$name]){
|
182 |
+
$mapping_selected = 'selected'; ?>
|
183 |
+
|
184 |
+
<option value="<?php echo $csvheader; ?>" <?php echo $mapping_selected;?>> <?php echo $csvheader; ?> </option>
|
185 |
+
<?php }
|
186 |
+
}
|
187 |
if($name == $csvheader) {?>
|
188 |
<option value="<?php print($csvheader); ?>" selected><?php print($csvheader); ?> </option>
|
189 |
<?php
|
279 |
</div>
|
280 |
<div class="clearfix"></div>
|
281 |
<div class="mb20"></div>
|
282 |
+
<input type="hidden" name="smack_uci_mapping_method" value="<?php if(isset($_REQUEST['mapping_type'])) echo sanitize_title($_REQUEST['mapping_type']); ?>">
|
283 |
|
284 |
</form>
|
285 |
</div>
|
admin/views/form-settings-view.php
CHANGED
@@ -42,6 +42,8 @@ $ucisettings = get_option('sm_uci_pro_settings');
|
|
42 |
$ucioptimize = get_option('sm_uci_pro_optimization');
|
43 |
$droptable = isset($ucisettings['drop_table']) ? $ucisettings['drop_table'] : '';
|
44 |
$schedule_mail = isset($ucisettings['send_log_email']) ? $ucisettings['send_log_email'] : '';
|
|
|
|
|
45 |
$send_password = isset($ucisettings['send_user_password']) ? $ucisettings['send_user_password'] : '';
|
46 |
$woocomattr = isset($ucisettings['woocomattr']) ? $ucisettings['woocomattr'] : '';
|
47 |
$author_editor_access = isset($ucisettings['author_editor_access']) ? $ucisettings['author_editor_access'] : '';
|
@@ -73,6 +75,26 @@ if(!empty($schedule_mail)){
|
|
73 |
$data['mailoff_status'] = 'checked';
|
74 |
}
|
75 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
if(!empty($send_password)){
|
77 |
if($send_password == 'on'){
|
78 |
$data['mail_on'] = 'enablesetting';
|
@@ -235,7 +257,26 @@ if(isset($ucioptimize['delete_all_trackback_comments'])) {
|
|
235 |
</div>
|
236 |
</div>
|
237 |
</div>
|
238 |
-
<div class="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
<div class="form-group mt20">
|
240 |
<div class="col-xs-12 col-sm-8 col-md-8 nopadding">
|
241 |
<h4><?php echo esc_html_e('Send password to user','wp-ultimate-csv-importer'); ?></h4>
|
42 |
$ucioptimize = get_option('sm_uci_pro_optimization');
|
43 |
$droptable = isset($ucisettings['drop_table']) ? $ucisettings['drop_table'] : '';
|
44 |
$schedule_mail = isset($ucisettings['send_log_email']) ? $ucisettings['send_log_email'] : '';
|
45 |
+
$main_mode = isset($ucisettings['enable_main_mode']) ? $ucisettings['enable_main_mode'] : '';
|
46 |
+
$maintenance_text = isset($ucisettings['main_mode_text']) ? $ucisettings['main_mode_text'] : '';
|
47 |
$send_password = isset($ucisettings['send_user_password']) ? $ucisettings['send_user_password'] : '';
|
48 |
$woocomattr = isset($ucisettings['woocomattr']) ? $ucisettings['woocomattr'] : '';
|
49 |
$author_editor_access = isset($ucisettings['author_editor_access']) ? $ucisettings['author_editor_access'] : '';
|
75 |
$data['mailoff_status'] = 'checked';
|
76 |
}
|
77 |
}
|
78 |
+
if(!empty($main_mode)){
|
79 |
+
if($main_mode == 'on'){
|
80 |
+
$data['maintenance_on'] = 'enablesetting';
|
81 |
+
$data['maintenance_off'] = 'disablesetting';
|
82 |
+
$data['maintenance_status'] = 'checked';
|
83 |
+
$data['maintenance_status'] = '';
|
84 |
+
$main_mode = "checked='checked'";
|
85 |
+
$mainmode_hide = '';
|
86 |
+
} else {
|
87 |
+
$data['maintenance_off'] = 'enablesetting';
|
88 |
+
$data['maintenance_on'] = 'disablesetting';
|
89 |
+
$data['maintenance_status'] = '';
|
90 |
+
$data['maintenance_status'] = 'checked';
|
91 |
+
$main_mode = "";
|
92 |
+
$mainmode_hide = 'hidden';
|
93 |
+
}
|
94 |
+
}
|
95 |
+
else{
|
96 |
+
$mainmode_hide = 'hidden';
|
97 |
+
}
|
98 |
if(!empty($send_password)){
|
99 |
if($send_password == 'on'){
|
100 |
$data['mail_on'] = 'enablesetting';
|
257 |
</div>
|
258 |
</div>
|
259 |
</div>
|
260 |
+
<!-- <div class="form-group mt20">
|
261 |
+
<div class="col-xs-12 col-sm-8 col-md-8 nopadding">
|
262 |
+
<h4><?php //echo esc_html_e('Maintenance mode','wp-ultimate-csv-importer-pro'); ?></h4>
|
263 |
+
<p><?php //echo esc_html_e('Enable to maintain your Wordpress site.','wp-ultimate-csv-importer-pro'); ?></p>
|
264 |
+
</div>
|
265 |
+
<div class="col-xs-12 col-sm-4 col-md-3">
|
266 |
+
<div class="mt20">
|
267 |
+
<input id="enable_main_mode" type='checkbox' class="tgl tgl-skewed noicheck" name='enable_main_mode' <?php //echo $main_mode; ?> style="display:none" onclick="saveoptions(this.id, this.name);" />
|
268 |
+
<label data-tg-off="NO" data-tg-on="YES" for="enable_main_mode" id="download_on" class="tgl-btn" style="font-size: 16px;" >
|
269 |
+
</label>
|
270 |
+
</div>
|
271 |
+
</div>
|
272 |
+
</div>
|
273 |
+
<div class="clearfix"></div>
|
274 |
+
<div class="form-group mt20" <?php //echo $mainmode_hide; ?> >
|
275 |
+
<div class="col-xs-12 col-sm-12 col-md-10 nopadding">
|
276 |
+
<input type="text" id='main_mode_text' class="form-control" name = 'main_mode_text' placeholder = 'Site is under maintenance mode. Please wait few min!' value='<?php //echo $maintenance_text;?>' onblur="saveoptions(this.id, this.name);" >
|
277 |
+
</div>
|
278 |
+
</div> -->
|
279 |
+
<div class="clearfix"></div>
|
280 |
<div class="form-group mt20">
|
281 |
<div class="col-xs-12 col-sm-8 col-md-8 nopadding">
|
282 |
<h4><?php echo esc_html_e('Send password to user','wp-ultimate-csv-importer'); ?></h4>
|
assets/css/style-maintenance.css
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#wpadminbar .smack-main-mode > .ab-item{
|
2 |
+
color:#fff;
|
3 |
+
background-color: #f44;
|
4 |
+
background-image: -moz-linear-gradient(bottom, #d00, #f44);
|
5 |
+
background-image: -webkit-gradient(linear, left bottom, left top, from(#d00), to(#f44));
|
6 |
+
}
|
7 |
+
|
8 |
+
#wpadminbar .smack-main-mode:hover > .ab-item{
|
9 |
+
background-color: #a30 !important;
|
10 |
+
color: white !important;
|
11 |
+
background-image: -moz-linear-gradient(bottom, #d00, #a30) !important;
|
12 |
+
background-image: -webkit-gradient(linear, left bottom, left top, from(#d00), to(#a30)) !important;
|
13 |
+
}
|
14 |
+
|
15 |
+
.main-mode-front {
|
16 |
+
position: fixed;
|
17 |
+
width:100%;
|
18 |
+
color: #fd1902;
|
19 |
+
background-color: #d7ccca;
|
20 |
+
left: 0px;
|
21 |
+
top: 0px;
|
22 |
+
box-shadow: 10px 10px 5px #888888;
|
23 |
+
z-index: 999;
|
24 |
+
text-align: center;
|
25 |
+
font: 20px;
|
26 |
+
padding: 20px;
|
27 |
+
}
|
assets/js/ultimate-importer.js
CHANGED
@@ -775,6 +775,11 @@ function igniteImport() {
|
|
775 |
var total = parseInt(totalcount) + 1;
|
776 |
var startLimit = currentlimit;
|
777 |
var endLimit = parseInt(importlimit) + parseInt(currentlimit);
|
|
|
|
|
|
|
|
|
|
|
778 |
|
779 |
var postData = new Array();
|
780 |
postData = {
|
@@ -808,8 +813,11 @@ function igniteImport() {
|
|
808 |
document.getElementById('updated').value = response.updated;
|
809 |
document.getElementById('skipped').value = response.skipped;
|
810 |
jQuery('#innerlog').prepend(jQuery(response.eventLog + "<br>"));
|
|
|
|
|
|
|
811 |
if(currentlimit == total) {
|
812 |
-
|
813 |
document.getElementById('continue_import').style.display = 'none';
|
814 |
document.getElementById('new_import').style.display = '';
|
815 |
document.getElementById('terminate_now').style.display='none';
|
@@ -1794,14 +1802,45 @@ function settings_div_selection(id) {
|
|
1794 |
}
|
1795 |
}
|
1796 |
//options_savein_ajax
|
1797 |
-
function saveoptions(id,
|
1798 |
-
|
1799 |
-
if(
|
1800 |
-
value =
|
1801 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1802 |
value = 'off';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1803 |
|
1804 |
-
//Ajax save option
|
1805 |
jQuery.ajax({
|
1806 |
url: ajaxurl,
|
1807 |
type: 'post',
|
@@ -1811,11 +1850,23 @@ function saveoptions(id, name){
|
|
1811 |
'value': value,
|
1812 |
},
|
1813 |
success: function (response) {
|
1814 |
-
if(id != 'image-handling-btn' && id != 'gallery-support-btn')
|
1815 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1816 |
}
|
1817 |
});
|
|
|
1818 |
}
|
|
|
1819 |
function pro_feature() {
|
1820 |
swal('Warning!', 'This feature is available only in PRO.', 'warning')
|
1821 |
}
|
775 |
var total = parseInt(totalcount) + 1;
|
776 |
var startLimit = currentlimit;
|
777 |
var endLimit = parseInt(importlimit) + parseInt(currentlimit);
|
778 |
+
var main_mode = document.getElementById('main_mode').value;
|
779 |
+
var msg1 = null;
|
780 |
+
if(main_mode == "on"){
|
781 |
+
msg1 = "Maintenance mode enabled";
|
782 |
+
}
|
783 |
|
784 |
var postData = new Array();
|
785 |
postData = {
|
813 |
document.getElementById('updated').value = response.updated;
|
814 |
document.getElementById('skipped').value = response.skipped;
|
815 |
jQuery('#innerlog').prepend(jQuery(response.eventLog + "<br>"));
|
816 |
+
if(currentlimit == 2 && msg1 != null){
|
817 |
+
jQuery('#innerlog').append(jQuery("<p style='margin-left:10px;color:green;'>"+msg1+"</p>"));
|
818 |
+
}
|
819 |
if(currentlimit == total) {
|
820 |
+
var msg = 'Import Successfully Completed';
|
821 |
document.getElementById('continue_import').style.display = 'none';
|
822 |
document.getElementById('new_import').style.display = '';
|
823 |
document.getElementById('terminate_now').style.display='none';
|
1802 |
}
|
1803 |
}
|
1804 |
//options_savein_ajax
|
1805 |
+
function saveoptions(id,name){
|
1806 |
+
//alert(id+name);
|
1807 |
+
if(id!='main_check_rollback' && id!='main_check_import_off' && id!='main_check_import_on'){
|
1808 |
+
var value = document.getElementById(id).checked;
|
1809 |
+
if(value == true)
|
1810 |
+
value = 'on';
|
1811 |
+
else
|
1812 |
+
value = 'off';
|
1813 |
+
}
|
1814 |
+
//cmb2_customization
|
1815 |
+
if(name == 'cmb2') {
|
1816 |
+
value = document.getElementById(id).value;
|
1817 |
+
}
|
1818 |
+
if (name == 'main_mode_text') {
|
1819 |
+
value = document.getElementById(id).value;
|
1820 |
+
}
|
1821 |
+
|
1822 |
+
if(id=='main_mode_config')
|
1823 |
+
name = 'enable_main_mode';
|
1824 |
+
|
1825 |
+
if(id=='rollback_mode_config')
|
1826 |
+
name = 'rollback_mode';
|
1827 |
+
|
1828 |
+
if(id == 'main_check_import_off'){
|
1829 |
+
name = 'enable_main_mode';
|
1830 |
value = 'off';
|
1831 |
+
}
|
1832 |
+
|
1833 |
+
if(id == 'main_check_import_on'){
|
1834 |
+
name = 'enable_main_mode';
|
1835 |
+
value = 'on';
|
1836 |
+
}
|
1837 |
+
|
1838 |
+
if(id=='main_check_rollback'){
|
1839 |
+
name = 'rollback_mode';
|
1840 |
+
value = '';
|
1841 |
+
}
|
1842 |
+
//alert(name+value);
|
1843 |
|
|
|
1844 |
jQuery.ajax({
|
1845 |
url: ajaxurl,
|
1846 |
type: 'post',
|
1850 |
'value': value,
|
1851 |
},
|
1852 |
success: function (response) {
|
1853 |
+
if( id != 'main_check_import_on' && id != 'main_check_rollback' && id != 'image-handling-btn' && id != 'gallery-support-btn'){
|
1854 |
+
if(name == 'enable_main_mode' || id == 'main_check_import_off' || id == 'rollback_mode_config')
|
1855 |
+
window.location.reload();
|
1856 |
+
else
|
1857 |
+
swal('Success!', 'Settings successfully updated.', 'success')
|
1858 |
+
}
|
1859 |
+
// if (id == 'main_check_import') {
|
1860 |
+
// swal('Success!', 'Maintenance mode disabled.', 'success')
|
1861 |
+
// }
|
1862 |
+
// if (id == 'main_check_rollback') {
|
1863 |
+
// swal('Success!', 'Roll back mode disabled.', 'success')
|
1864 |
+
// }
|
1865 |
}
|
1866 |
});
|
1867 |
+
|
1868 |
}
|
1869 |
+
|
1870 |
function pro_feature() {
|
1871 |
swal('Warning!', 'This feature is available only in PRO.', 'warning')
|
1872 |
}
|
includes/class-uci-cfs-data-import.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class SmackUCICFSDataImport {
|
3 |
+
|
4 |
+
public function push_cfs_data() {
|
5 |
+
global $uci_admin;
|
6 |
+
$cfsdata = $uci_admin->getRowMapping();
|
7 |
+
$data_array = $cfsdata['CFS'];
|
8 |
+
if(!empty($cfsdata)) {
|
9 |
+
if(in_array('custom-field-suite/cfs.php', $uci_admin->get_active_plugins()) ) {
|
10 |
+
$this->importDataCFSFields($data_array, $uci_admin->getImportAs(), $uci_admin->getLastImportId());
|
11 |
+
}
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
public function importDataCFSFields ($data_array, $importas, $pID) {
|
16 |
+
global $uci_admin;
|
17 |
+
global $wpdb;
|
18 |
+
$cfs_data = $uci_admin->CFSFields();
|
19 |
+
foreach ($data_array as $dkey => $dvalue) {
|
20 |
+
if(array_key_exists($dkey,$cfs_data['CFS'])){
|
21 |
+
if($cfs_data['CFS'][$dkey]['type'] == 'hyperlink'){
|
22 |
+
$linksfields = explode('|', $dvalue);
|
23 |
+
$linksarr['url'] = $linksfields[0];
|
24 |
+
$linksarr['text'] = $linksfields[1];
|
25 |
+
$linksarr['target'] = $linksfields[2];
|
26 |
+
$darray[$cfs_data['CFS'][$dkey]['name']] = $linksarr;
|
27 |
+
}
|
28 |
+
elseif($cfs_data['CFS'][$dkey]['type'] == 'file'){
|
29 |
+
$darray[$cfs_data['CFS'][$dkey]['name']] = $uci_admin->set_featureimage($dvalue, $pID);
|
30 |
+
}elseif($cfs_data['CFS'][$dkey]['type'] == 'select'){
|
31 |
+
if( strpos($dvalue, ',') !== false )
|
32 |
+
{
|
33 |
+
$multifields = explode(',', $dvalue);
|
34 |
+
foreach($multifields as $mk => $mv){
|
35 |
+
$meta_id = add_post_meta($pID, $cfs_data['CFS'][$dkey]['name'], $mv);
|
36 |
+
$this->insert_cfs_values($cfs_data,$pID,$meta_id,$cfs_data['CFS'][$dkey]['name']);
|
37 |
+
}
|
38 |
+
}else{
|
39 |
+
$darray[$cfs_data['CFS'][$dkey]['name']] = $dvalue;
|
40 |
+
}
|
41 |
+
}elseif($cfs_data['CFS'][$dkey]['type'] == 'relationship'){
|
42 |
+
$relations = explode(',', $dvalue);
|
43 |
+
foreach($relations as $rk => $rv){
|
44 |
+
$relationid = $wpdb->get_col($wpdb->prepare("select ID from $wpdb->posts where post_title = %s and post_type != %s",$rv,'revision'));
|
45 |
+
$meta_id = add_post_meta($pID, $cfs_data['CFS'][$dkey]['name'], $relationid[0]);
|
46 |
+
$this->insert_cfs_values($cfs_data,$pID,$meta_id,$cfs_data['CFS'][$dkey]['name']);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
elseif($cfs_data['CFS'][$dkey]['type'] == 'term'){
|
50 |
+
$relationterms = explode(',', $dvalue);
|
51 |
+
foreach($relationterms as $rtk => $rtv){
|
52 |
+
$termid = $uci_admin->get_requested_term_details($pID, $rtv);
|
53 |
+
$meta_id = add_post_meta($pID, $cfs_data['CFS'][$dkey]['name'], $termid);
|
54 |
+
$this->insert_cfs_values($cfs_data,$pID,$meta_id,$cfs_data['CFS'][$dkey]['name']);
|
55 |
+
}
|
56 |
+
}elseif($cfs_data['CFS'][$dkey]['type'] == 'user'){
|
57 |
+
$users = explode(',', $dvalue);
|
58 |
+
foreach($users as $uk => $uv){
|
59 |
+
$userdata = $uci_admin->get_from_user_details($uv);
|
60 |
+
$meta_id = add_post_meta($pID, $cfs_data['CFS'][$dkey]['name'], $userdata['user_id']);
|
61 |
+
$this->insert_cfs_values($cfs_data,$pID,$meta_id,$cfs_data['CFS'][$dkey]['name']);
|
62 |
+
}
|
63 |
+
}
|
64 |
+
else{
|
65 |
+
$darray[$dkey] = $dvalue;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
if($darray){
|
70 |
+
foreach($darray as $mkey => $mval){
|
71 |
+
$metaid = update_post_meta($pID, $mkey, $mval);
|
72 |
+
$this->insert_cfs_values($cfs_data,$pID,$metaid,$mkey);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
public function insert_cfs_values($cfs_data,$pID,$metaid,$mkey) {
|
79 |
+
global $wpdb;
|
80 |
+
$wpdb->insert($wpdb->prefix.'cfs_values',
|
81 |
+
array('field_id' => $cfs_data['CFS'][$mkey]['fieldid'],
|
82 |
+
'meta_id' => $metaid,
|
83 |
+
'post_id' => $pID,
|
84 |
+
),
|
85 |
+
array('%s','%s','%s')
|
86 |
+
);
|
87 |
+
}
|
88 |
+
}
|
89 |
+
global $cfsHelper;
|
90 |
+
$cfsHelper = new SmackUCICFSDataImport();
|
includes/class-uci-exporter.php
CHANGED
@@ -93,9 +93,31 @@ class SmackUCIExporter {
|
|
93 |
$this->fileName = isset($_POST['fileName']) ? sanitize_text_field($_POST['fileName']) : ''; //'Post.csv';
|
94 |
$this->offset = isset($_POST['offset']) ? sanitize_text_field($_POST['offset']) : 0;
|
95 |
$this->limit = isset($_POST['limit']) ? sanitize_text_field($_POST['limit']) : 1000;
|
|
|
96 |
$this->exportData();
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
/**
|
100 |
*
|
101 |
*/
|
@@ -471,6 +493,7 @@ class SmackUCIExporter {
|
|
471 |
|
472 |
public function FetchComments() {
|
473 |
global $wpdb;
|
|
|
474 |
$get_comments = "select *from $wpdb->comments";
|
475 |
$get_comments .= " where comment_approved in (0,1)";
|
476 |
// Check for specific period
|
@@ -491,9 +514,9 @@ class SmackUCIExporter {
|
|
491 |
if(!empty($comments)) {
|
492 |
foreach($comments as $commentInfo) {
|
493 |
foreach($commentInfo as $commentKey => $commentVal) {
|
494 |
-
if(!in_array($commentKey, $this->headers)) {
|
495 |
-
|
496 |
-
}
|
497 |
$this->data[$commentInfo->comment_ID][$commentKey] = $commentVal;
|
498 |
}
|
499 |
}
|
@@ -884,7 +907,7 @@ class SmackUCIExporter {
|
|
884 |
$header_exclusion = array();
|
885 |
foreach ($headers as $hVal) {
|
886 |
#if($this->eventExclusions['is_check'] === true && array_key_exists($hKey, $this->eventExclusions['exclusion_headers'])) :
|
887 |
-
if(
|
888 |
#unset($this->headers[$hKey]);
|
889 |
#else:
|
890 |
$header_exclusion[] = $hVal;
|
93 |
$this->fileName = isset($_POST['fileName']) ? sanitize_text_field($_POST['fileName']) : ''; //'Post.csv';
|
94 |
$this->offset = isset($_POST['offset']) ? sanitize_text_field($_POST['offset']) : 0;
|
95 |
$this->limit = isset($_POST['limit']) ? sanitize_text_field($_POST['limit']) : 1000;
|
96 |
+
$this->delimiter = isset($_POST['conditions']['delimiter']) ? $this->setDelimiter( $_POST['conditions']['delimiter'] ) : ',';
|
97 |
$this->exportData();
|
98 |
}
|
99 |
|
100 |
+
/**
|
101 |
+
* set the delimiter
|
102 |
+
*/
|
103 |
+
public function setDelimiter($conditions)
|
104 |
+
{
|
105 |
+
if(isset($conditions['delimiter']) && $conditions['delimiter'] != 'Select'){
|
106 |
+
if($conditions['delimiter'] == '{Tab}')
|
107 |
+
return "\t";
|
108 |
+
elseif ($conditions['delimiter'] == '{Space}')
|
109 |
+
return " ";
|
110 |
+
else
|
111 |
+
return $conditions['delimiter'];
|
112 |
+
}
|
113 |
+
elseif (isset($conditions['optional_delimiter']) && $conditions['optional_delimiter'] != '') {
|
114 |
+
return $conditions['optional_delimiter'];
|
115 |
+
}
|
116 |
+
else{
|
117 |
+
return ',';
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
/**
|
122 |
*
|
123 |
*/
|
493 |
|
494 |
public function FetchComments() {
|
495 |
global $wpdb;
|
496 |
+
$this->generateHeaders($this->module, $this->optionalType);
|
497 |
$get_comments = "select *from $wpdb->comments";
|
498 |
$get_comments .= " where comment_approved in (0,1)";
|
499 |
// Check for specific period
|
514 |
if(!empty($comments)) {
|
515 |
foreach($comments as $commentInfo) {
|
516 |
foreach($commentInfo as $commentKey => $commentVal) {
|
517 |
+
//if(!in_array($commentKey, $this->headers)) {
|
518 |
+
// $this->headers[] = $commentKey;
|
519 |
+
//}
|
520 |
$this->data[$commentInfo->comment_ID][$commentKey] = $commentVal;
|
521 |
}
|
522 |
}
|
907 |
$header_exclusion = array();
|
908 |
foreach ($headers as $hVal) {
|
909 |
#if($this->eventExclusions['is_check'] === true && array_key_exists($hKey, $this->eventExclusions['exclusion_headers'])) :
|
910 |
+
if(array_key_exists($hVal, $this->eventExclusions['exclusion_headers'])) :
|
911 |
#unset($this->headers[$hKey]);
|
912 |
#else:
|
913 |
$header_exclusion[] = $hVal;
|
includes/class-uci-helper.php
CHANGED
@@ -1779,6 +1779,15 @@ $currentMapping = $this->generateDataArrayBasedOnGroups( $available_groups_type,
|
|
1779 |
case 'YOASTSEO':
|
1780 |
# Note: Removed data import for WordPress Yoast SEO fields
|
1781 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1782 |
case 'TERMS':
|
1783 |
$terms_row_mapping = $this->getRowMapping('TERMS');
|
1784 |
if(empty($terms_row_mapping))
|
@@ -1840,6 +1849,7 @@ $currentMapping = $this->generateDataArrayBasedOnGroups( $available_groups_type,
|
|
1840 |
if(!in_array($data_array['comment_approved'], $valid_status)) {
|
1841 |
$data_array['comment_approved'] = 0;
|
1842 |
}
|
|
|
1843 |
if ($post_exists) {
|
1844 |
$retID = wp_insert_comment($data_array);
|
1845 |
$uci_admin->setInsertedRowCount($uci_admin->getInsertedRowCount() + 1);
|
@@ -2041,7 +2051,7 @@ $currentMapping = $this->generateDataArrayBasedOnGroups( $available_groups_type,
|
|
2041 |
$nextGenInfo = array();
|
2042 |
$media_settings = $this->parse_media_settings($mediaConfig, $data_array);
|
2043 |
$featured_image_info = array(
|
2044 |
-
'value' => $data_array['featured_image'],
|
2045 |
//'rename_image' => $renameimage,
|
2046 |
'nextgen_gallery' => $nextGenInfo,
|
2047 |
'media_settings' => $media_settings
|
@@ -2086,6 +2096,36 @@ $currentMapping = $this->generateDataArrayBasedOnGroups( $available_groups_type,
|
|
2086 |
|
2087 |
}
|
2088 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2089 |
public function assignTermsAndTaxonomies($categories, $category_name, $pID) {
|
2090 |
$get_category_list = $category_list = array();
|
2091 |
// Create / Assign categories to the post types
|
@@ -2546,6 +2586,53 @@ $currentMapping = $this->generateDataArrayBasedOnGroups( $available_groups_type,
|
|
2546 |
#NOTE: Removed save mapping template feature
|
2547 |
}
|
2548 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2549 |
/**
|
2550 |
* @param $filename
|
2551 |
* @param $version
|
@@ -2652,6 +2739,10 @@ $currentMapping = $this->generateDataArrayBasedOnGroups( $available_groups_type,
|
|
2652 |
}
|
2653 |
|
2654 |
public function assign_post_status($data_array) {
|
|
|
|
|
|
|
|
|
2655 |
if (isset($data_array ['post_type']) && $data_array ['post_type'] == 'page') {
|
2656 |
$data_array ['post_status'] = 'publish';
|
2657 |
} else {
|
@@ -2661,6 +2752,7 @@ $currentMapping = $this->generateDataArrayBasedOnGroups( $available_groups_type,
|
|
2661 |
} else {
|
2662 |
$data_array['post_status'] = strtolower( $data_array['coupon_status'] );
|
2663 |
}
|
|
|
2664 |
if ($data_array['post_status'] != 'publish' && $data_array['post_status'] != 'private' && $data_array['post_status'] != 'draft' && $data_array['post_status'] != 'pending' && $data_array['post_status'] != 'sticky') {
|
2665 |
$stripPSF = strpos($data_array['post_status'], '{');
|
2666 |
if ($stripPSF === 0) {
|
@@ -3180,6 +3272,13 @@ $currentMapping = $this->generateDataArrayBasedOnGroups( $available_groups_type,
|
|
3180 |
return $media_settings;
|
3181 |
}
|
3182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3183 |
// Push core fields data into database
|
3184 |
public function core_information_into_db ($mode, $data_array) {
|
3185 |
|
1779 |
case 'YOASTSEO':
|
1780 |
# Note: Removed data import for WordPress Yoast SEO fields
|
1781 |
break;
|
1782 |
+
case 'CFS':
|
1783 |
+
$cfs_row_mapping = $this->getRowMapping('CFS');
|
1784 |
+
if(empty($cfs_row_mapping) || !file_exists(SM_UCI_PRO_DIR . 'includes/class-uci-cfs-data-import.php')) {
|
1785 |
+
break;
|
1786 |
+
}
|
1787 |
+
require_once "class-uci-cfs-data-import.php";
|
1788 |
+
global $cfsHelper;
|
1789 |
+
$cfsHelper->push_cfs_data();
|
1790 |
+
break;
|
1791 |
case 'TERMS':
|
1792 |
$terms_row_mapping = $this->getRowMapping('TERMS');
|
1793 |
if(empty($terms_row_mapping))
|
1849 |
if(!in_array($data_array['comment_approved'], $valid_status)) {
|
1850 |
$data_array['comment_approved'] = 0;
|
1851 |
}
|
1852 |
+
$data_array['comment_approved'] = trim($data_array['comment_approved']);
|
1853 |
if ($post_exists) {
|
1854 |
$retID = wp_insert_comment($data_array);
|
1855 |
$uci_admin->setInsertedRowCount($uci_admin->getInsertedRowCount() + 1);
|
2051 |
$nextGenInfo = array();
|
2052 |
$media_settings = $this->parse_media_settings($mediaConfig, $data_array);
|
2053 |
$featured_image_info = array(
|
2054 |
+
'value' => trim($data_array['featured_image']),
|
2055 |
//'rename_image' => $renameimage,
|
2056 |
'nextgen_gallery' => $nextGenInfo,
|
2057 |
'media_settings' => $media_settings
|
2096 |
|
2097 |
}
|
2098 |
|
2099 |
+
public function CFSFields(){
|
2100 |
+
global $wpdb;
|
2101 |
+
$customFields = $cfs_field = array();
|
2102 |
+
$get_cfs_groups = $wpdb->get_results($wpdb->prepare("select ID from $wpdb->posts where post_type = %s", 'cfs'),ARRAY_A);
|
2103 |
+
$group_id_arr = '';
|
2104 |
+
foreach ( $get_cfs_groups as $item => $group_rules ) {
|
2105 |
+
$group_id_arr .= $group_rules['ID'] . ',';
|
2106 |
+
}
|
2107 |
+
if($group_id_arr != '') {
|
2108 |
+
$group_id_arr = substr( $group_id_arr, 0, - 1 );
|
2109 |
+
// Get available CFS fields based on the import type and group id
|
2110 |
+
$get_cfs_fields = $wpdb->get_results( $wpdb->prepare("SELECT meta_value FROM $wpdb->postmeta WHERE post_id IN ($group_id_arr) and meta_key = 'cfs_fields'"), ARRAY_A);
|
2111 |
+
}
|
2112 |
+
// Available CFS fields
|
2113 |
+
if (!empty($get_cfs_fields)) {
|
2114 |
+
foreach ($get_cfs_fields as $key => $value) {
|
2115 |
+
$get_cfs_field = @unserialize($value['meta_value']);
|
2116 |
+
foreach($get_cfs_field as $fk => $fv){
|
2117 |
+
$customFields["CFS"][$fv['name']]['label'] = $fv['label'];
|
2118 |
+
$customFields["CFS"][$fv['name']]['name'] = $fv['name'];
|
2119 |
+
$customFields["CFS"][$fv['name']]['type'] = $fv['type'];
|
2120 |
+
$customFields["CFS"][$fv['name']]['fieldid'] = $fv['id'];
|
2121 |
+
$cfs_field[] = $fv['name'];
|
2122 |
+
}
|
2123 |
+
}
|
2124 |
+
}
|
2125 |
+
return $customFields;
|
2126 |
+
}
|
2127 |
+
|
2128 |
+
|
2129 |
public function assignTermsAndTaxonomies($categories, $category_name, $pID) {
|
2130 |
$get_category_list = $category_list = array();
|
2131 |
// Create / Assign categories to the post types
|
2586 |
#NOTE: Removed save mapping template feature
|
2587 |
}
|
2588 |
|
2589 |
+
public function get_mapping_screendata($module,$post_values){
|
2590 |
+
global $uci_admin;
|
2591 |
+
$available_group = $uci_admin->available_widgets($module, $importAs);
|
2592 |
+
foreach ($available_group as $groupname => $groupvalue) {
|
2593 |
+
foreach ($post_values as $mapping_key => $mapping_value) {
|
2594 |
+
$current_mapped_group_mapkey = explode($groupvalue . '__mapping', $mapping_key);
|
2595 |
+
$current_mapped_group_key = explode($groupvalue . '__fieldname', $mapping_key);
|
2596 |
+
$current_static_group_key = explode($groupvalue . '_statictext_mapping', $mapping_key);
|
2597 |
+
$current_formula_group_key = explode($groupvalue . '_formulatext_mapping', $mapping_key);
|
2598 |
+
if (is_array($current_mapped_group_mapkey) && count($current_mapped_group_mapkey) == 2) {
|
2599 |
+
$set_mapping_groups[$groupvalue][] = $mapping_value;
|
2600 |
+
}
|
2601 |
+
if (is_array($current_mapped_group_key) && count($current_mapped_group_key) == 2) {
|
2602 |
+
$set_fields_group[$groupvalue][] = $mapping_value;
|
2603 |
+
$current_row_val = $mapping_value;
|
2604 |
+
}
|
2605 |
+
//static and formula features
|
2606 |
+
if(is_array($current_static_group_key) && count($current_static_group_key) == 2){
|
2607 |
+
$set_static_group[$groupvalue][$current_row_val] = $mapping_value;
|
2608 |
+
}
|
2609 |
+
if(is_array($current_formula_group_key) && count($current_formula_group_key) == 2){
|
2610 |
+
$set_formula_group[$groupvalue][$current_row_val] = $mapping_value;
|
2611 |
+
}
|
2612 |
+
|
2613 |
+
}
|
2614 |
+
if (!empty($set_fields_group[$groupvalue]) && !empty($set_mapping_groups[$groupvalue])) {
|
2615 |
+
$new_mapped_array[$groupvalue] = array_combine($set_fields_group[$groupvalue], $set_mapping_groups[$groupvalue]);
|
2616 |
+
}
|
2617 |
+
//static and formula features
|
2618 |
+
if(!empty($set_static_group[$groupvalue] )) {
|
2619 |
+
foreach ($set_static_group[$groupvalue] as $grp => $val) {
|
2620 |
+
if (!empty($new_mapped_array) && array_key_exists($grp, $new_mapped_array[$groupvalue])) {
|
2621 |
+
$new_mapped_array[$groupvalue][$grp] = $val;
|
2622 |
+
}
|
2623 |
+
}
|
2624 |
+
}
|
2625 |
+
if(!empty($set_formula_group[$groupvalue] )) {
|
2626 |
+
foreach ($set_formula_group[$groupvalue] as $grp => $val) {
|
2627 |
+
if (!empty($new_mapped_array) && array_key_exists($grp, $new_mapped_array[$groupvalue])) {
|
2628 |
+
$new_mapped_array[$groupvalue][$grp] = $val;
|
2629 |
+
}
|
2630 |
+
}
|
2631 |
+
}
|
2632 |
+
}
|
2633 |
+
return $new_mapped_array;
|
2634 |
+
}
|
2635 |
+
|
2636 |
/**
|
2637 |
* @param $filename
|
2638 |
* @param $version
|
2739 |
}
|
2740 |
|
2741 |
public function assign_post_status($data_array) {
|
2742 |
+
if (isset($data_array['is_post_status']) && $data_array['is_post_status'] != 'on') {
|
2743 |
+
$data_array ['post_status'] = $data_array['is_post_status'];
|
2744 |
+
unset($data_array['is_post_status']);
|
2745 |
+
}
|
2746 |
if (isset($data_array ['post_type']) && $data_array ['post_type'] == 'page') {
|
2747 |
$data_array ['post_status'] = 'publish';
|
2748 |
} else {
|
2752 |
} else {
|
2753 |
$data_array['post_status'] = strtolower( $data_array['coupon_status'] );
|
2754 |
}
|
2755 |
+
$data_array['post_status'] = trim($data_array['post_status']);
|
2756 |
if ($data_array['post_status'] != 'publish' && $data_array['post_status'] != 'private' && $data_array['post_status'] != 'draft' && $data_array['post_status'] != 'pending' && $data_array['post_status'] != 'sticky') {
|
2757 |
$stripPSF = strpos($data_array['post_status'], '{');
|
2758 |
if ($stripPSF === 0) {
|
3272 |
return $media_settings;
|
3273 |
}
|
3274 |
|
3275 |
+
public function updateMaintenance($value)
|
3276 |
+
{
|
3277 |
+
$mode = array();
|
3278 |
+
$mode['enable_main_mode'] = $value;
|
3279 |
+
update_option('sm_uci_pro_settings', $mode);
|
3280 |
+
}
|
3281 |
+
|
3282 |
// Push core fields data into database
|
3283 |
public function core_information_into_db ($mode, $data_array) {
|
3284 |
|
includes/class-uci-user-data-import.php
CHANGED
@@ -42,7 +42,7 @@ class SmackUCIUserDataImport {
|
|
42 |
|
43 |
public function importUserInformation ($data_array, $mode, $eventKey) {
|
44 |
global $uci_admin;
|
45 |
-
|
46 |
if ( isset( $data_array['role'] ) && $data_array['role'] != '') {
|
47 |
$user_capability = '';
|
48 |
if ( !is_numeric( $data_array['role'] ) ) {
|
42 |
|
43 |
public function importUserInformation ($data_array, $mode, $eventKey) {
|
44 |
global $uci_admin;
|
45 |
+
#$data_array = trim($data_array);
|
46 |
if ( isset( $data_array['role'] ) && $data_array['role'] != '') {
|
47 |
$user_capability = '';
|
48 |
if ( !is_numeric( $data_array['role'] ) ) {
|
index.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/******************************
|
3 |
* Plugin Name: WP Ultimate CSV Importer
|
4 |
* Description: Seamlessly create posts, custom posts, pages, media, SEO and more from your CSV data with ease.
|
5 |
-
* Version: 5.
|
6 |
* Author: smackcoders
|
7 |
* Plugin URI: http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress
|
8 |
* Author URI: http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress
|
@@ -57,7 +57,7 @@ if ( ! class_exists( 'SM_WPUltimateCSVImporter' ) ) :
|
|
57 |
*/
|
58 |
class SM_WPUltimateCSVImporter {
|
59 |
|
60 |
-
public $version = '5.
|
61 |
|
62 |
/**
|
63 |
* The single instance of the class.
|
@@ -263,6 +263,7 @@ if ( ! class_exists( 'SM_WPUltimateCSVImporter' ) ) :
|
|
263 |
//new files include
|
264 |
wp_enqueue_style('custom-new-style', plugins_url('assets/css/custom-new-style.css', __FILE__));
|
265 |
}
|
|
|
266 |
}
|
267 |
|
268 |
/**
|
@@ -354,3 +355,37 @@ function SmackUCI() {
|
|
354 |
}
|
355 |
// Global for backwards compatibility.
|
356 |
$GLOBALS['wp_ultimate_csv_importer'] = SmackUCI();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/******************************
|
3 |
* Plugin Name: WP Ultimate CSV Importer
|
4 |
* Description: Seamlessly create posts, custom posts, pages, media, SEO and more from your CSV data with ease.
|
5 |
+
* Version: 5.3
|
6 |
* Author: smackcoders
|
7 |
* Plugin URI: http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress
|
8 |
* Author URI: http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress
|
57 |
*/
|
58 |
class SM_WPUltimateCSVImporter {
|
59 |
|
60 |
+
public $version = '5.3';
|
61 |
|
62 |
/**
|
63 |
* The single instance of the class.
|
263 |
//new files include
|
264 |
wp_enqueue_style('custom-new-style', plugins_url('assets/css/custom-new-style.css', __FILE__));
|
265 |
}
|
266 |
+
wp_enqueue_style('style-maintenance', plugins_url('assets/css/style-maintenance.css', __FILE__));
|
267 |
}
|
268 |
|
269 |
/**
|
355 |
}
|
356 |
// Global for backwards compatibility.
|
357 |
$GLOBALS['wp_ultimate_csv_importer'] = SmackUCI();
|
358 |
+
|
359 |
+
//Maintenance mode
|
360 |
+
$options = get_option('sm_uci_pro_settings');
|
361 |
+
$enable_main_mode = isset($options['enable_main_mode']) ? $options['enable_main_mode'] : '';
|
362 |
+
$maintainance_text = isset($options['main_mode_text']) ? $options['main_mode_text'] : '';
|
363 |
+
|
364 |
+
if($maintainance_text == "")
|
365 |
+
$maintainance_text = "Site is under maintenance mode. Please wait few min!";
|
366 |
+
|
367 |
+
|
368 |
+
function activate_maintenance_mode() {
|
369 |
+
include(ABSPATH . "wp-includes/pluggable.php");
|
370 |
+
global $maintainance_text;
|
371 |
+
if(!current_user_can('manage_options')) {
|
372 |
+
?>
|
373 |
+
<div class="main-mode-front"> <span> <?php echo $maintainance_text; ?> </span> </div>
|
374 |
+
<?php }
|
375 |
+
}
|
376 |
+
|
377 |
+
function admin_bar_menu(){
|
378 |
+
global $wp_admin_bar;
|
379 |
+
$wp_admin_bar->add_menu( array(
|
380 |
+
'id' => 'debug-bar',
|
381 |
+
'href' => admin_url().'admin.php?page=sm-uci-import',
|
382 |
+
'parent' => 'top-secondary',
|
383 |
+
'title' => apply_filters( 'debug_bar_title', __('Maintenance Mode', 'ultimate-maintenance-mode') ),
|
384 |
+
'meta' => array( 'class' => 'smack-main-mode' ),
|
385 |
+
) );
|
386 |
+
}
|
387 |
+
|
388 |
+
if($enable_main_mode == "on"){
|
389 |
+
add_action( 'admin_bar_menu', 'admin_bar_menu' );
|
390 |
+
add_action('wp_head', 'activate_maintenance_mode');
|
391 |
+
}
|