Version Description
Download this release
Release Info
Developer | smackcoders |
Plugin | Ultimate CSV Importer |
Version | 3.9 |
Comparing to | |
See all releases |
Code changes from version 3.8.8 to 3.9
- Readme.txt +13 -4
- includes/WPImporter_includes_helper.php +26 -29
- index.php +2 -2
- lib/jquery-plugins/UploadHandler.php +1 -1
- lib/skinnymvc/core/SkinnyUser.php +1 -1
- lib/skinnymvc/dbcontroller/base/SkinnyBaseDbController.php +1 -1
- modules/custompost/templates/index.php +6 -6
- modules/eshop/templates/index.php +6 -6
- modules/page/templates/index.php +6 -6
- modules/post/templates/index.php +7 -7
- plugins/class.inlineimages.php +4 -3
- templates/import.php +0 -1
Readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Contributors: smackcoders
|
3 |
Donate link: http://www.smackcoders.com/donate.html
|
4 |
Tags: categories, category, custom post type, e-commerce, ecommerce, free, html, html5, image, images, import, multisite, page, pages, picture, plugin, Post, products, rss, seo, shortcode, tag, Taxonomy, template, thumbnail, upload, url, user, woocommerce, WordPress, wpmu, xml.
|
5 |
-
Requires at least: 4.
|
6 |
-
Tested up to: 4.4.
|
7 |
-
Stable tag: 3.
|
8 |
-
Version: 3.
|
9 |
Author: smackcoders
|
10 |
Author URI: http://profiles.wordpress.org/smackcoders/
|
11 |
|
@@ -115,6 +115,12 @@ This will solve your issue or get support from hosting if you didn’t have suff
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
= 3.8.8 =
|
119 |
* Added: Localize script for multi language support.
|
120 |
* Added: WordPress 4.4.1 compatibility.
|
@@ -428,6 +434,9 @@ This will solve your issue or get support from hosting if you didn’t have suff
|
|
428 |
|
429 |
== Upgrade Notice ==
|
430 |
|
|
|
|
|
|
|
431 |
= 3.8.8 =
|
432 |
* Upgrade now for security fix and WordPress 4.1.1 compatibility with minor bug fixes.
|
433 |
|
2 |
Contributors: smackcoders
|
3 |
Donate link: http://www.smackcoders.com/donate.html
|
4 |
Tags: categories, category, custom post type, e-commerce, ecommerce, free, html, html5, image, images, import, multisite, page, pages, picture, plugin, Post, products, rss, seo, shortcode, tag, Taxonomy, template, thumbnail, upload, url, user, woocommerce, WordPress, wpmu, xml.
|
5 |
+
Requires at least: 4.0
|
6 |
+
Tested up to: 4.4.2
|
7 |
+
Stable tag: 3.9
|
8 |
+
Version: 3.9
|
9 |
Author: smackcoders
|
10 |
Author URI: http://profiles.wordpress.org/smackcoders/
|
11 |
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 3.9 =
|
119 |
+
* Added: PHP 7 compatibility.
|
120 |
+
* Added: Support for all post date formats.
|
121 |
+
* Fixed: Featured image and Inline image naming issues.
|
122 |
+
* Fixed: Auto mapping issues in Custom Fields and SEO Fields.
|
123 |
+
|
124 |
= 3.8.8 =
|
125 |
* Added: Localize script for multi language support.
|
126 |
* Added: WordPress 4.4.1 compatibility.
|
434 |
|
435 |
== Upgrade Notice ==
|
436 |
|
437 |
+
= 3.9 =
|
438 |
+
* Upgrade now for PHP 7 and WordPress 4.4.2 compatibility.
|
439 |
+
|
440 |
= 3.8.8 =
|
441 |
* Upgrade now for security fix and WordPress 4.1.1 compatibility with minor bug fixes.
|
442 |
|
includes/WPImporter_includes_helper.php
CHANGED
@@ -550,9 +550,9 @@ class WPImporter_includes_helper {
|
|
550 |
$f_img = $new_post [$ckey];
|
551 |
$fimg_path = $full_path;
|
552 |
$fimg_name = @basename($f_img);
|
553 |
-
|
554 |
-
$fimg_name =
|
555 |
-
$fimg_name = preg_replace('/[^a-zA-Z0-9._
|
556 |
$fimg_name = urlencode($fimg_name);
|
557 |
$parseURL = parse_url($f_img);
|
558 |
$path_parts = pathinfo($f_img);
|
@@ -560,8 +560,9 @@ class WPImporter_includes_helper {
|
|
560 |
$fimg_name = $fimg_name . '.jpg';
|
561 |
}
|
562 |
$f_img_slug = '';
|
|
|
563 |
$f_img_slug = strtolower(str_replace('', '-', $f_img_slug));
|
564 |
-
$f_img_slug = preg_replace('/[^a-zA-Z0-9._
|
565 |
$post_slug_value = strtolower($f_img_slug);
|
566 |
if (array_key_exists('extension', $path_parts)) {
|
567 |
//$fimg_name = wp_unique_filename($fimg_path, $fimg_name, $path_parts['extension']);
|
@@ -572,7 +573,7 @@ class WPImporter_includes_helper {
|
|
572 |
if (@getimagesize($filepath)) {
|
573 |
$img = wp_get_image_editor($filepath);
|
574 |
$file ['guid'] = $baseurl . "/" . $fimg_name;
|
575 |
-
$file ['post_title'] = $
|
576 |
$file ['post_content'] = '';
|
577 |
$file ['post_status'] = 'attachment';
|
578 |
} else {
|
@@ -602,24 +603,19 @@ class WPImporter_includes_helper {
|
|
602 |
}
|
603 |
|
604 |
// Date format post
|
605 |
-
if (isset($data_array['post_date'])) {
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
else {
|
619 |
-
$data_array ['post_date'] = date('Y-m-d H:i:s');
|
620 |
-
$this->detailedLog[$currentLimit]['postdate'] = "<b>" . __('Date', 'wp-ultimate-csv-importer') . " - </b>" . $data_array ['post_date'] . ' . Unformatted date so current date was replaced.';
|
621 |
-
}
|
622 |
-
}
|
623 |
if (isset($data_array ['post_slug'])) {
|
624 |
$data_array ['post_name'] = $data_array ['post_slug'];
|
625 |
}
|
@@ -919,7 +915,7 @@ class WPImporter_includes_helper {
|
|
919 |
if (!empty ($file)) {
|
920 |
//$wp_filetype = wp_check_filetype(@basename($file ['guid']), null);
|
921 |
$wp_upload_dir = wp_upload_dir();
|
922 |
-
$attachment = array('guid' => $file ['guid'], 'post_mime_type' => 'image/jpeg', 'post_title' => preg_replace('/[^a-zA-Z0-9._\s]/', '', @basename($file ['
|
923 |
if ($get_media_settings == 1) {
|
924 |
$generate_attachment = $dirname . '/' . $fimg_name;
|
925 |
} else {
|
@@ -931,15 +927,17 @@ class WPImporter_includes_helper {
|
|
931 |
wp_update_attachment_metadata($attach_id, $attach_data);*/
|
932 |
$existing_attachment = array();
|
933 |
$query = $wpdb->get_results($wpdb->prepare("select post_title from $wpdb->posts where post_type = %s and post_mime_type = %s",'attachment','image/jpeg'));
|
934 |
-
|
935 |
-
$
|
|
|
|
|
936 |
}
|
937 |
-
if (!in_array($
|
938 |
$attach_id = wp_insert_attachment($attachment, $generate_attachment, $post_id);
|
939 |
$attach_data = wp_generate_attachment_metadata($attach_id, $uploadedImage);
|
940 |
wp_update_attachment_metadata($attach_id, $attach_data);
|
941 |
} else {
|
942 |
-
$query2 = $wpdb->get_results($wpdb->prepare("select ID from $wpdb->posts where post_title = %s and post_type = %s",$
|
943 |
foreach ($query2 as $key2) {
|
944 |
$attach_id = $key2->ID;
|
945 |
}
|
@@ -949,7 +947,6 @@ class WPImporter_includes_helper {
|
|
949 |
} else {
|
950 |
$skippedRecords[] = $_SESSION['SMACK_SKIPPED_RECORDS'];
|
951 |
}
|
952 |
-
|
953 |
$this->detailedLog[$currentLimit]['verify_here'] = "<b>Verify Here -</b> <a href='" . get_permalink($post_id) . "' title='" . esc_attr(sprintf(__('View “%s”'), $data_array['post_title'])) . "' rel='permalink' target='_blank'>" . __('Web View', 'wp-ultimate-csv-importer') . "</a> | <a href='" . get_edit_post_link($post_id) . "' title='" . esc_attr(__('Edit this item', 'wp-ultimate-csv-importer')) . "' target='_blank'>" . __('Admin View', 'wp-ultimate-csv-importer') . "</a>";
|
954 |
}
|
955 |
unset($data_array);
|
550 |
$f_img = $new_post [$ckey];
|
551 |
$fimg_path = $full_path;
|
552 |
$fimg_name = @basename($f_img);
|
553 |
+
|
554 |
+
$fimg_name = str_replace(' ', '-', $fimg_name);
|
555 |
+
$fimg_name = preg_replace('/[^a-zA-Z0-9._\-\s]/', '', $fimg_name);
|
556 |
$fimg_name = urlencode($fimg_name);
|
557 |
$parseURL = parse_url($f_img);
|
558 |
$path_parts = pathinfo($f_img);
|
560 |
$fimg_name = $fimg_name . '.jpg';
|
561 |
}
|
562 |
$f_img_slug = '';
|
563 |
+
$featured_image = $path_parts['filename'];
|
564 |
$f_img_slug = strtolower(str_replace('', '-', $f_img_slug));
|
565 |
+
$f_img_slug = preg_replace('/[^a-zA-Z0-9._\-\s]/', '', $f_img_slug);
|
566 |
$post_slug_value = strtolower($f_img_slug);
|
567 |
if (array_key_exists('extension', $path_parts)) {
|
568 |
//$fimg_name = wp_unique_filename($fimg_path, $fimg_name, $path_parts['extension']);
|
573 |
if (@getimagesize($filepath)) {
|
574 |
$img = wp_get_image_editor($filepath);
|
575 |
$file ['guid'] = $baseurl . "/" . $fimg_name;
|
576 |
+
$file ['post_title'] = $featured_image;
|
577 |
$file ['post_content'] = '';
|
578 |
$file ['post_status'] = 'attachment';
|
579 |
} else {
|
603 |
}
|
604 |
|
605 |
// Date format post
|
606 |
+
if (!isset($data_array ['post_date'])) {
|
607 |
+
$data_array ['post_date'] = date('Y-m-d H:i:s');
|
608 |
+
$this->detailedLog[$currentLimit]['postdate'] = "<b>" . __('Date', 'wp-ultimate-csv-importer') . " - </b>" . $data_array ['post_date'];
|
609 |
+
} else {
|
610 |
+
if(strtotime($data_array ['post_date'])){
|
611 |
+
$data_array ['post_date'] = date('Y-m-d H:i:s', strtotime($data_array ['post_date']));
|
612 |
+
$this->detailedLog[$currentLimit]['postdate'] = "<b>" . __('Date', 'wp-ultimate-csv-importer') . " - </b>" . $data_array ['post_date'];
|
613 |
+
}
|
614 |
+
else {
|
615 |
+
$data_array ['post_date'] = date('Y-m-d H:i:s');
|
616 |
+
$this->detailedLog[$currentLimit]['postdate'] = "<b>" . __('Date', 'wp-ultimate-csv-importer') . " - </b>" . $data_array ['post_date'] . ' . Unformatted date so current date was replaced.';
|
617 |
+
}
|
618 |
+
}
|
|
|
|
|
|
|
|
|
|
|
619 |
if (isset($data_array ['post_slug'])) {
|
620 |
$data_array ['post_name'] = $data_array ['post_slug'];
|
621 |
}
|
915 |
if (!empty ($file)) {
|
916 |
//$wp_filetype = wp_check_filetype(@basename($file ['guid']), null);
|
917 |
$wp_upload_dir = wp_upload_dir();
|
918 |
+
$attachment = array('guid' => $file ['guid'], 'post_mime_type' => 'image/jpeg', 'post_title' => preg_replace('/[^a-zA-Z0-9._\s]/', '', @basename($file ['post_title'])), 'post_content' => '', 'post_status' => 'inherit');
|
919 |
if ($get_media_settings == 1) {
|
920 |
$generate_attachment = $dirname . '/' . $fimg_name;
|
921 |
} else {
|
927 |
wp_update_attachment_metadata($attach_id, $attach_data);*/
|
928 |
$existing_attachment = array();
|
929 |
$query = $wpdb->get_results($wpdb->prepare("select post_title from $wpdb->posts where post_type = %s and post_mime_type = %s",'attachment','image/jpeg'));
|
930 |
+
if(!empty($query)) {
|
931 |
+
foreach ( $query as $key ) {
|
932 |
+
$existing_attachment[] = $key->post_title;
|
933 |
+
}
|
934 |
}
|
935 |
+
if (!in_array($attachment['post_title'], $existing_attachment)) {
|
936 |
$attach_id = wp_insert_attachment($attachment, $generate_attachment, $post_id);
|
937 |
$attach_data = wp_generate_attachment_metadata($attach_id, $uploadedImage);
|
938 |
wp_update_attachment_metadata($attach_id, $attach_data);
|
939 |
} else {
|
940 |
+
$query2 = $wpdb->get_results($wpdb->prepare("select ID from $wpdb->posts where post_title = %s and post_type = %s",$attachment['post_title'],'attachment'));
|
941 |
foreach ($query2 as $key2) {
|
942 |
$attach_id = $key2->ID;
|
943 |
}
|
947 |
} else {
|
948 |
$skippedRecords[] = $_SESSION['SMACK_SKIPPED_RECORDS'];
|
949 |
}
|
|
|
950 |
$this->detailedLog[$currentLimit]['verify_here'] = "<b>Verify Here -</b> <a href='" . get_permalink($post_id) . "' title='" . esc_attr(sprintf(__('View “%s”'), $data_array['post_title'])) . "' rel='permalink' target='_blank'>" . __('Web View', 'wp-ultimate-csv-importer') . "</a> | <a href='" . get_edit_post_link($post_id) . "' title='" . esc_attr(__('Edit this item', 'wp-ultimate-csv-importer')) . "' target='_blank'>" . __('Admin View', 'wp-ultimate-csv-importer') . "</a>";
|
951 |
}
|
952 |
unset($data_array);
|
index.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/******************************
|
3 |
* Plugin Name: WP Ultimate CSV Importer
|
4 |
* Description: A plugin that helps to import the data's from a CSV file.
|
5 |
-
* Version: 3.
|
6 |
* Author: smackcoders.com
|
7 |
* Text Domain: wp-ultimate-csv-importer
|
8 |
* Domain Path: /languages
|
@@ -81,7 +81,7 @@ define('WP_CONST_ULTIMATE_CSV_IMP_URL', 'http://www.smackcoders.com/wp-ultimate-
|
|
81 |
define('WP_CONST_ULTIMATE_CSV_IMP_NAME', 'WP Ultimate CSV Importer');
|
82 |
define('WP_CONST_ULTIMATE_CSV_IMP_SLUG', 'wp-ultimate-csv-importer');
|
83 |
define('WP_CONST_ULTIMATE_CSV_IMP_SETTINGS', 'WP Ultimate CSV Importer');
|
84 |
-
define('WP_CONST_ULTIMATE_CSV_IMP_VERSION', '3.
|
85 |
define('WP_CONST_ULTIMATE_CSV_IMP_DIR', WP_PLUGIN_URL . '/' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/');
|
86 |
define('WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY', plugin_dir_path(__FILE__));
|
87 |
define('WP_CSVIMP_PLUGIN_BASE', WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY);
|
2 |
/******************************
|
3 |
* Plugin Name: WP Ultimate CSV Importer
|
4 |
* Description: A plugin that helps to import the data's from a CSV file.
|
5 |
+
* Version: 3.9
|
6 |
* Author: smackcoders.com
|
7 |
* Text Domain: wp-ultimate-csv-importer
|
8 |
* Domain Path: /languages
|
81 |
define('WP_CONST_ULTIMATE_CSV_IMP_NAME', 'WP Ultimate CSV Importer');
|
82 |
define('WP_CONST_ULTIMATE_CSV_IMP_SLUG', 'wp-ultimate-csv-importer');
|
83 |
define('WP_CONST_ULTIMATE_CSV_IMP_SETTINGS', 'WP Ultimate CSV Importer');
|
84 |
+
define('WP_CONST_ULTIMATE_CSV_IMP_VERSION', '3.9');
|
85 |
define('WP_CONST_ULTIMATE_CSV_IMP_DIR', WP_PLUGIN_URL . '/' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/');
|
86 |
define('WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY', plugin_dir_path(__FILE__));
|
87 |
define('WP_CSVIMP_PLUGIN_BASE', WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY);
|
lib/jquery-plugins/UploadHandler.php
CHANGED
@@ -141,7 +141,7 @@ class UploadHandler {
|
|
141 |
$HelperObj = new WPImporter_includes_helper();
|
142 |
$uploadDir = $HelperObj->uploadDir;
|
143 |
|
144 |
-
$file_name = $file_name ? $file_name : '';
|
145 |
if (empty($version)) {
|
146 |
$version_path = '';
|
147 |
} else {
|
141 |
$HelperObj = new WPImporter_includes_helper();
|
142 |
$uploadDir = $HelperObj->uploadDir;
|
143 |
|
144 |
+
$file_name = $file_name ? sanitize_file_name($file_name) : '';
|
145 |
if (empty($version)) {
|
146 |
$version_path = '';
|
147 |
} else {
|
lib/skinnymvc/core/SkinnyUser.php
CHANGED
@@ -15,7 +15,7 @@ class SkinnyUser {
|
|
15 |
|
16 |
private $attributes = array();
|
17 |
|
18 |
-
|
19 |
}
|
20 |
|
21 |
/**
|
15 |
|
16 |
private $attributes = array();
|
17 |
|
18 |
+
public function __construct() {
|
19 |
}
|
20 |
|
21 |
/**
|
lib/skinnymvc/dbcontroller/base/SkinnyBaseDbController.php
CHANGED
@@ -8,7 +8,7 @@ class SkinnyBaseDbController extends PDO {
|
|
8 |
|
9 |
protected static $connections = array();
|
10 |
|
11 |
-
|
12 |
parent::__construct($dsn, $username, $password, $driver_options);
|
13 |
self::$connections[$dbKey][$mode] = $this;
|
14 |
}
|
8 |
|
9 |
protected static $connections = array();
|
10 |
|
11 |
+
public function __construct($dbKey, $mode, $dsn, $username = null, $password = null, $driver_options = null) {
|
12 |
parent::__construct($dsn, $username, $password, $driver_options);
|
13 |
self::$connections[$dbKey][$mode] = $this;
|
14 |
}
|
modules/custompost/templates/index.php
CHANGED
@@ -419,8 +419,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
419 |
</select>
|
420 |
|
421 |
<script type="text/javascript">
|
422 |
-
jQuery("select#
|
423 |
-
if (jQuery(this).val() == "<?php print(esc_js($
|
424 |
jQuery(this).prop('selected', true);
|
425 |
}
|
426 |
});
|
@@ -515,8 +515,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
515 |
<?php
|
516 |
if(!empty($impCE->defCols) && is_array($impCE->defCols)) {
|
517 |
foreach ($impCE->defCols as $key => $value) {
|
518 |
-
if (strstr($key, 'SEO:')) {
|
519 |
-
$value = str_replace('SEO:', '', $value)
|
520 |
?>
|
521 |
<tr>
|
522 |
<td class="left_align" style='width:53%; padding-left:150px;'>
|
@@ -540,8 +540,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
540 |
</select>
|
541 |
|
542 |
<script type="text/javascript">
|
543 |
-
jQuery("select#
|
544 |
-
if (jQuery(this).val() == "<?php print(esc_js($
|
545 |
jQuery(this).prop('selected', true);
|
546 |
}
|
547 |
});
|
419 |
</select>
|
420 |
|
421 |
<script type="text/javascript">
|
422 |
+
jQuery("select#coremapping<?php print(esc_js($count)); ?>").find('option').each(function () {
|
423 |
+
if (jQuery(this).val() == "<?php print(esc_js($value));?>") {
|
424 |
jQuery(this).prop('selected', true);
|
425 |
}
|
426 |
});
|
515 |
<?php
|
516 |
if(!empty($impCE->defCols) && is_array($impCE->defCols)) {
|
517 |
foreach ($impCE->defCols as $key => $value) {
|
518 |
+
if (strstr($key, 'SEO: ')) {
|
519 |
+
$value = str_replace('SEO: ', '', $value)
|
520 |
?>
|
521 |
<tr>
|
522 |
<td class="left_align" style='width:53%; padding-left:150px;'>
|
540 |
</select>
|
541 |
|
542 |
<script type="text/javascript">
|
543 |
+
jQuery("select#seomapping<?php print(esc_js($count)); ?>").find('option').each(function () {
|
544 |
+
if (jQuery(this).val() == "<?php print(esc_js($value));?>") {
|
545 |
jQuery(this).prop('selected', true);
|
546 |
}
|
547 |
});
|
modules/eshop/templates/index.php
CHANGED
@@ -331,8 +331,8 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] !== 'not_avail'
|
|
331 |
</select>
|
332 |
|
333 |
<script type="text/javascript">
|
334 |
-
jQuery("select#
|
335 |
-
if(jQuery(this).val() == "<?php print(esc_js($
|
336 |
jQuery(this).prop('selected', true);
|
337 |
}
|
338 |
});
|
@@ -423,8 +423,8 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] !== 'not_avail'
|
|
423 |
<?php
|
424 |
if(!empty($impCE->defCols) && is_array($impCE->defCols)) {
|
425 |
foreach($impCE->defCols as $key => $value){
|
426 |
-
if(strstr($key,'SEO:')){
|
427 |
-
$value = str_replace('SEO:','',$value)
|
428 |
?>
|
429 |
<tr>
|
430 |
<td class="left_align" style='width:53%; padding-left:150px;'>
|
@@ -445,8 +445,8 @@ if ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['isplugin_avail'] !== 'not_avail'
|
|
445 |
</select>
|
446 |
|
447 |
<script type="text/javascript">
|
448 |
-
jQuery("select#
|
449 |
-
if(jQuery(this).val() == "<?php print(esc_js($
|
450 |
jQuery(this).prop('selected', true);
|
451 |
}
|
452 |
});
|
331 |
</select>
|
332 |
|
333 |
<script type="text/javascript">
|
334 |
+
jQuery("select#coremapping<?php print(esc_js($count)); ?>").find('option').each(function() {
|
335 |
+
if(jQuery(this).val() == "<?php print(esc_js($value));?>") {
|
336 |
jQuery(this).prop('selected', true);
|
337 |
}
|
338 |
});
|
423 |
<?php
|
424 |
if(!empty($impCE->defCols) && is_array($impCE->defCols)) {
|
425 |
foreach($impCE->defCols as $key => $value){
|
426 |
+
if(strstr($key,'SEO: ')){
|
427 |
+
$value = str_replace('SEO: ','',$value)
|
428 |
?>
|
429 |
<tr>
|
430 |
<td class="left_align" style='width:53%; padding-left:150px;'>
|
445 |
</select>
|
446 |
|
447 |
<script type="text/javascript">
|
448 |
+
jQuery("select#seomapping<?php print(esc_js($count)); ?>").find('option').each(function() {
|
449 |
+
if(jQuery(this).val() == "<?php print(esc_js($value));?>") {
|
450 |
jQuery(this).prop('selected', true);
|
451 |
}
|
452 |
});
|
modules/page/templates/index.php
CHANGED
@@ -372,8 +372,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
372 |
}?>
|
373 |
</select>
|
374 |
<script type="text/javascript">
|
375 |
-
jQuery("select#
|
376 |
-
if (jQuery(this).val() == "<?php print(esc_js($
|
377 |
jQuery(this).prop('selected', true);
|
378 |
}
|
379 |
});
|
@@ -417,8 +417,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
417 |
<?php
|
418 |
if(!empty($impCE->defCols) && is_array($impCE->defCols)) {
|
419 |
foreach ($impCE->defCols as $key => $value) {
|
420 |
-
if (strstr($key, 'SEO:')) {
|
421 |
-
$value = str_replace('SEO:', '', $value)
|
422 |
?>
|
423 |
<tr>
|
424 |
<td class="left_align" style='width:53%;padding-left:150px'>
|
@@ -442,8 +442,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
442 |
} ?>
|
443 |
</select>
|
444 |
<script type="text/javascript">
|
445 |
-
jQuery("select#
|
446 |
-
if (jQuery(this).val() == "<?php print(esc_js($
|
447 |
jQuery(this).prop('selected', true);
|
448 |
}
|
449 |
});
|
372 |
}?>
|
373 |
</select>
|
374 |
<script type="text/javascript">
|
375 |
+
jQuery("select#coremapping<?php print(esc_js($count)); ?>").find('option').each(function () {
|
376 |
+
if (jQuery(this).val() == "<?php print(esc_js($value));?>") {
|
377 |
jQuery(this).prop('selected', true);
|
378 |
}
|
379 |
});
|
417 |
<?php
|
418 |
if(!empty($impCE->defCols) && is_array($impCE->defCols)) {
|
419 |
foreach ($impCE->defCols as $key => $value) {
|
420 |
+
if (strstr($key, 'SEO: ')) {
|
421 |
+
$value = str_replace('SEO: ', '', $value)
|
422 |
?>
|
423 |
<tr>
|
424 |
<td class="left_align" style='width:53%;padding-left:150px'>
|
442 |
} ?>
|
443 |
</select>
|
444 |
<script type="text/javascript">
|
445 |
+
jQuery("select#seomapping<?php print(esc_js($count)); ?>").find('option').each(function () {
|
446 |
+
if (jQuery(this).val() == "<?php print(esc_js($value));?>") {
|
447 |
jQuery(this).prop('selected', true);
|
448 |
}
|
449 |
});
|
modules/post/templates/index.php
CHANGED
@@ -327,8 +327,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
327 |
}?>
|
328 |
</select>
|
329 |
<script type="text/javascript">
|
330 |
-
jQuery("select#
|
331 |
-
if (jQuery(this).val() == "<?php print(esc_js($
|
332 |
jQuery(this).prop('selected', true);
|
333 |
}
|
334 |
});
|
@@ -385,7 +385,7 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
385 |
</select>
|
386 |
<script type="text/javascript">
|
387 |
jQuery("select#term_mapping<?php print(esc_js($count)); ?>").find('option').each(function () {
|
388 |
-
if (jQuery(this).val() == "<?php print(esc_js($
|
389 |
jQuery(this).prop('selected', true);
|
390 |
}
|
391 |
});
|
@@ -418,8 +418,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
418 |
<?php
|
419 |
if(is_array($impCE->defCols) && !empty($impCE->defCols)) {
|
420 |
foreach ($impCE->defCols as $key => $value) {
|
421 |
-
if (strstr($key, 'SEO:')) {
|
422 |
-
$value = str_replace('SEO:', '', $value)
|
423 |
?>
|
424 |
<tr>
|
425 |
<td class="left_align" style='width:53%; padding-left:170px;'>
|
@@ -440,8 +440,8 @@ $nonce_Key = $impCE->create_nonce_key();
|
|
440 |
}?>
|
441 |
</select>
|
442 |
<script type="text/javascript">
|
443 |
-
jQuery("select#
|
444 |
-
if (jQuery(this).val() == "<?php print(esc_js($
|
445 |
jQuery(this).prop('selected', true);
|
446 |
}
|
447 |
});
|
327 |
}?>
|
328 |
</select>
|
329 |
<script type="text/javascript">
|
330 |
+
jQuery("select#coremapping<?php print(esc_js($count)); ?>").find('option').each(function () {
|
331 |
+
if (jQuery(this).val() == "<?php print(esc_js($value));?>") {
|
332 |
jQuery(this).prop('selected', true);
|
333 |
}
|
334 |
});
|
385 |
</select>
|
386 |
<script type="text/javascript">
|
387 |
jQuery("select#term_mapping<?php print(esc_js($count)); ?>").find('option').each(function () {
|
388 |
+
if (jQuery(this).val() == "<?php print(esc_js($value));?>") {
|
389 |
jQuery(this).prop('selected', true);
|
390 |
}
|
391 |
});
|
418 |
<?php
|
419 |
if(is_array($impCE->defCols) && !empty($impCE->defCols)) {
|
420 |
foreach ($impCE->defCols as $key => $value) {
|
421 |
+
if (strstr($key, 'SEO: ')) {
|
422 |
+
$value = str_replace('SEO: ', '', $value)
|
423 |
?>
|
424 |
<tr>
|
425 |
<td class="left_align" style='width:53%; padding-left:170px;'>
|
440 |
}?>
|
441 |
</select>
|
442 |
<script type="text/javascript">
|
443 |
+
jQuery("select#seomapping<?php print(esc_js($count)); ?>").find('option').each(function () {
|
444 |
+
if (jQuery(this).val() == "<?php print(esc_js($value));?>") {
|
445 |
jQuery(this).prop('selected', true);
|
446 |
}
|
447 |
});
|
plugins/class.inlineimages.php
CHANGED
@@ -309,6 +309,7 @@ class WPImporter_inlineImages {
|
|
309 |
array('width' => 624, 'height' => 468, 'crop' => false));
|
310 |
$resize = $img->multi_resize($sizes_array);
|
311 |
}
|
|
|
312 |
$inline_file ['guid'] = $baseurl . "/" . $get_inlineimage_val;
|
313 |
$inline_file ['post_title'] = $get_inlineimage_val;
|
314 |
$inline_file ['post_content'] = '';
|
@@ -316,9 +317,9 @@ class WPImporter_inlineImages {
|
|
316 |
$wp_upload_dir = wp_upload_dir();
|
317 |
$attachment = array('guid' => $inline_file ['guid'], 'post_mime_type' => 'image/jpeg', 'post_title' => preg_replace('/\.[^.]+$/', '', @basename($inline_file ['guid'])), 'post_content' => '', 'post_status' => 'inherit');
|
318 |
if ($get_media_settings == 1) {
|
319 |
-
$generate_attachment = $dirname . '/' . $
|
320 |
} else {
|
321 |
-
$generate_attachment = $
|
322 |
}
|
323 |
$uploadedImage = $wp_upload_dir['path'] . '/' . $get_inlineimage_val;
|
324 |
//duplicate check
|
@@ -339,7 +340,7 @@ class WPImporter_inlineImages {
|
|
339 |
|
340 |
$attach_data = wp_generate_attachment_metadata($attach_id, $uploadedImage);
|
341 |
wp_update_attachment_metadata($attach_id, $attach_data);
|
342 |
-
set_post_thumbnail($postID, $attach_id);
|
343 |
}
|
344 |
|
345 |
// if($shortcode_mode == 'Inline') {
|
309 |
array('width' => 624, 'height' => 468, 'crop' => false));
|
310 |
$resize = $img->multi_resize($sizes_array);
|
311 |
}
|
312 |
+
$get_inline_guid = str_replace(' ', '-', $get_inlineimage_val);
|
313 |
$inline_file ['guid'] = $baseurl . "/" . $get_inlineimage_val;
|
314 |
$inline_file ['post_title'] = $get_inlineimage_val;
|
315 |
$inline_file ['post_content'] = '';
|
317 |
$wp_upload_dir = wp_upload_dir();
|
318 |
$attachment = array('guid' => $inline_file ['guid'], 'post_mime_type' => 'image/jpeg', 'post_title' => preg_replace('/\.[^.]+$/', '', @basename($inline_file ['guid'])), 'post_content' => '', 'post_status' => 'inherit');
|
319 |
if ($get_media_settings == 1) {
|
320 |
+
$generate_attachment = $dirname . '/' . $get_inline_guid;
|
321 |
} else {
|
322 |
+
$generate_attachment = $get_inline_guid;
|
323 |
}
|
324 |
$uploadedImage = $wp_upload_dir['path'] . '/' . $get_inlineimage_val;
|
325 |
//duplicate check
|
340 |
|
341 |
$attach_data = wp_generate_attachment_metadata($attach_id, $uploadedImage);
|
342 |
wp_update_attachment_metadata($attach_id, $attach_data);
|
343 |
+
//set_post_thumbnail($postID, $attach_id);
|
344 |
}
|
345 |
|
346 |
// if($shortcode_mode == 'Inline') {
|
templates/import.php
CHANGED
@@ -149,7 +149,6 @@ for ($i = $limit; $i < $count; $i++) {
|
|
149 |
echo "<div style='margin-left:10px;'> Total no of records - " . $totRecords . ".</div><br>";
|
150 |
echo "<div style='margin-left:10px;'> Total no of mapped fields for single record - " . $mapped . ".</div><br>";
|
151 |
echo "<div style='margin-left:10px;'> Total no of unmapped fields for a record - " . $unmapped . ".</div><br>";
|
152 |
-
echo "<div style='margin-left:10px;'> Chosen server request is " . $count . " .</div><br>";
|
153 |
}
|
154 |
$colCount = count($resultArr[$i]);
|
155 |
$_SESSION['SMACK_SKIPPED_RECORDS'] = $i;
|
149 |
echo "<div style='margin-left:10px;'> Total no of records - " . $totRecords . ".</div><br>";
|
150 |
echo "<div style='margin-left:10px;'> Total no of mapped fields for single record - " . $mapped . ".</div><br>";
|
151 |
echo "<div style='margin-left:10px;'> Total no of unmapped fields for a record - " . $unmapped . ".</div><br>";
|
|
|
152 |
}
|
153 |
$colCount = count($resultArr[$i]);
|
154 |
$_SESSION['SMACK_SKIPPED_RECORDS'] = $i;
|