Ultimate CSV Importer - Version 3.1.0

Version Description

Download this release

Release Info

Developer smackcoders
Plugin Icon 128x128 Ultimate CSV Importer
Version 3.1.0
Comparing to
See all releases

Code changes from version 3.0.0 to 3.1.0

Readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === WP Ultimate CSV Importer Plugin ===
2
- Contributors: smackcoders
3
  Donate link: http://www.smackcoders.com/donate.html
4
  Tags: batch, excel, import, spreadsheet, plugin, admin, csv, importer,
5
- Requires at least: 3.4
6
  Tested up to: 3.5.1
7
- Stable tag: 3.0.0
8
- Version: 3.0.0
9
  Author: smackcoders
10
  Author URI: http://profiles.wordpress.org/smackcoders/
11
  License: GPLv2 or later
@@ -15,7 +15,7 @@ A plugin that turns your offline data as wordpress post, page or custom post dat
15
 
16
  == Description ==
17
 
18
- Version 3.0.0 is out now. So many major improvement changes,
19
  more flexible import options and added powerful features.
20
 
21
  WP Ultimate CSV Importer Plugin helps you to import any CSV file as post, page or even as custom post type. Convert your offline database maintained for years into your valuable website content. Also do periodical content changes, maintenance, content update, prices, offers, coupons and inventory etc.
@@ -87,6 +87,11 @@ Or view our hoe to guide video guide in our [Youtube Channel](www.youtube.com/us
87
 
88
 
89
  == Changelog ==
 
 
 
 
 
90
  = 3.0.0 = Lot of performance improvements
91
  - Much improved workflow
92
  - Custom Field mapping and import fixed
@@ -151,8 +156,8 @@ Or view our hoe to guide video guide in our [Youtube Channel](www.youtube.com/us
151
 
152
  = 1.1.0 = Added featured image import feature along with post/page/custom post.
153
 
154
- = 1.0.2 = - Bug fixed to recognize the trimmed trailing space in the CSV file
155
- - Added validation for the duplicate field mapping.
156
 
157
  = 1.0.1 = Added features to import multiple tags and categories with different delimiters.
158
 
@@ -163,6 +168,8 @@ Or view our hoe to guide video guide in our [Youtube Channel](www.youtube.com/us
163
 
164
  == Upgrade Notice ==
165
 
 
 
166
  =v 3.0.0 = Must upgrade to have Major improvements, performance fixes and issue fixes
167
 
168
  =v 2.7.0 = Major improvements and feature changes.
1
  === WP Ultimate CSV Importer Plugin ===
2
+ Contributors: Smackcoders
3
  Donate link: http://www.smackcoders.com/donate.html
4
  Tags: batch, excel, import, spreadsheet, plugin, admin, csv, importer,
5
+ Requires at least: 3.4.0
6
  Tested up to: 3.5.1
7
+ Stable tag: 3.1.0
8
+ Version: 3.1.0
9
  Author: smackcoders
10
  Author URI: http://profiles.wordpress.org/smackcoders/
11
  License: GPLv2 or later
15
 
16
  == Description ==
17
 
18
+ Version 3.1.0 is out now. So many major improvement changes,
19
  more flexible import options and added powerful features.
20
 
21
  WP Ultimate CSV Importer Plugin helps you to import any CSV file as post, page or even as custom post type. Convert your offline database maintained for years into your valuable website content. Also do periodical content changes, maintenance, content update, prices, offers, coupons and inventory etc.
87
 
88
 
89
  == Changelog ==
90
+
91
+ =v 3.1.0 = Much Improved Featured Image feature
92
+ -- Image url for featured image issues fixed
93
+ -- PHP 5.4 upgrade fix
94
+
95
  = 3.0.0 = Lot of performance improvements
96
  - Much improved workflow
97
  - Custom Field mapping and import fixed
156
 
157
  = 1.1.0 = Added featured image import feature along with post/page/custom post.
158
 
159
+ = 1.0.2 = Bug fixed to recognize the trimmed trailing space in the CSV file
160
+ - Added validation for the duplicate field mapping.
161
 
162
  = 1.0.1 = Added features to import multiple tags and categories with different delimiters.
163
 
168
 
169
  == Upgrade Notice ==
170
 
171
+ =v 3.1.0 = Now Much Improved Featured Image and url handling
172
+
173
  =v 3.0.0 = Must upgrade to have Major improvements, performance fixes and issue fixes
174
 
175
  =v 2.7.0 = Major improvements and feature changes.
SmackImpCE.php CHANGED
@@ -295,9 +295,20 @@ class SmackImpCE extends SmackWpHandler {
295
  $img_name = explode ( '/', $file_url );
296
  $imgurl_split = count ( $img_name );
297
  $img_name = explode ( '.', $img_name [$imgurl_split - 1] );
298
- $img_title = $img_name = $img_name [0];
 
 
 
 
 
 
 
 
 
 
 
299
  $dir = wp_upload_dir ();
300
- $dirname = 'featured_image';
301
  $full_path = $dir ['basedir'] . '/' . $dirname;
302
  $baseurl = $dir ['baseurl'] . '/' . $dirname;
303
  $filename = explode ( '/', $file_url );
@@ -305,12 +316,27 @@ class SmackImpCE extends SmackWpHandler {
305
  $filepath = $full_path . '/' . $plain_filename;
306
  $fileurl = $baseurl . '/' . $filename [$file_split - 1];
307
  if(is_dir($full_path)){
308
- $smack_fileCopy = copy($file_url,$filepath);
309
  }
310
  else{
311
  wp_mkdir_p($full_path);
312
- $smack_fileCopy = copy($file_url,$filepath);
313
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
314
  if ($smack_fileCopy) {
315
  $file ['guid'] = $fileurl;
316
  $file ['post_title'] = $img_title;
295
  $img_name = explode ( '/', $file_url );
296
  $imgurl_split = count ( $img_name );
297
  $img_name = explode ( '.', $img_name [$imgurl_split - 1] );
298
+ if(count($img_name) > 2){
299
+ for($r=0;$r<(count($img_name)-1);$r++){
300
+ if($r==0)
301
+ $img_title = $img_name[$r];
302
+ else
303
+ $img_title .= '.'.$img_name[$r];
304
+ }
305
+ $img_name = $img_title;
306
+ }
307
+ else{
308
+ $img_title = $img_name = $img_name [0];
309
+ }
310
  $dir = wp_upload_dir ();
311
+ $dirname = date('Y').'/'.date('m');
312
  $full_path = $dir ['basedir'] . '/' . $dirname;
313
  $baseurl = $dir ['baseurl'] . '/' . $dirname;
314
  $filename = explode ( '/', $file_url );
316
  $filepath = $full_path . '/' . $plain_filename;
317
  $fileurl = $baseurl . '/' . $filename [$file_split - 1];
318
  if(is_dir($full_path)){
319
+ $smack_fileCopy = @copy($file_url,$filepath);
320
  }
321
  else{
322
  wp_mkdir_p($full_path);
323
+ $smack_fileCopy = @copy($file_url,$filepath);
324
  }
325
+ $img = wp_get_image_editor( $filepath );
326
+ if ( ! is_wp_error( $img ) ) {
327
+
328
+ $sizes_array = array(
329
+ // #1 - resizes to 1024x768 pixel, square-cropped image
330
+ array ('width' => 1024, 'height' => 768, 'crop' => false),
331
+ // #2 - resizes to 100px max width/height, non-cropped image
332
+ array ('width' => 150, 'height' => 150, 'crop' => false),
333
+ // #3 - resizes to 100 pixel max height, non-cropped image
334
+ array ('width' => 330, 'height' => 220, 'crop' => false),
335
+ // #3 - resizes to 624x468 pixel max width, non-cropped image
336
+ array ('width' => 624, 'height' => 468, 'crop' => false)
337
+ );
338
+ $resize = $img->multi_resize( $sizes_array );
339
+ }
340
  if ($smack_fileCopy) {
341
  $file ['guid'] = $fileurl;
342
  $file ['post_title'] = $img_title;
images/icon.png CHANGED
File without changes
images/paypal_donate_button.png CHANGED
File without changes
imported_csv/readme.txt CHANGED
File without changes
wp_ultimate_csv_importer.php CHANGED
@@ -3,7 +3,7 @@
3
  *Plugin Name: WP Ultimate CSV Importer
4
  *Plugin URI: http://www.smackcoders.com/blog/how-to-guide-for-free-wordpress-ultimate-csv-importer-plugin.html
5
  *Description: A plugin that helps to import the data's from a CSV file.
6
- *Version: 3.0.0
7
  *Author: smackcoders.com
8
  *Author URI: http://www.smackcoders.com
9
  *
@@ -26,9 +26,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  ***********************************************************************************************
27
  */
28
 
29
- ini_set ( 'max_execution_time', 600 );
30
- ini_set ( 'memory_limit', '128M' );
31
-
32
  require_once (dirname ( __FILE__ ) . '/../../../wp-load.php');
33
 
34
  require_once ("SmackImpCE.php");
3
  *Plugin Name: WP Ultimate CSV Importer
4
  *Plugin URI: http://www.smackcoders.com/blog/how-to-guide-for-free-wordpress-ultimate-csv-importer-plugin.html
5
  *Description: A plugin that helps to import the data's from a CSV file.
6
+ *Version: 3.1.0
7
  *Author: smackcoders.com
8
  *Author URI: http://www.smackcoders.com
9
  *
26
  ***********************************************************************************************
27
  */
28
 
 
 
 
29
  require_once (dirname ( __FILE__ ) . '/../../../wp-load.php');
30
 
31
  require_once ("SmackImpCE.php");