Really Simple CSV Importer - Version 0.4.2

Version Description

  • Post title bug fix
Download this release

Release Info

Developer hissy
Plugin Icon wp plugin Really Simple CSV Importer
Version 0.4.2
Comparing to
See all releases

Code changes from version 0.4.1 to 0.4.2

Files changed (2) hide show
  1. readme.txt +18 -16
  2. rs-csv-importer.php +7 -4
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: hissy, wokamoto
3
  Tags: importer, csv, acf
4
  Requires at least: 3.0
5
  Tested up to: 3.6.1
6
- Stable tag: 0.4.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -23,22 +23,22 @@ Alternative CSV Importer plugin. Simple and powerful.
23
  Contains CSV file sample in `/wp-content/plugins/really-simple-csv-importer/sample` directory.
24
 
25
  = Available column names and values: =
26
- * ID or post_id: (int) post id.
27
  This value is not required. The post ID is already exists in your blog, importer will update that post data. If the ID is not exists, importer will trying to create a new post with suggested ID.
28
- * post_author: (login or ID) author
29
- * post_date: (string) publish date
30
- * post_content: (string) post content
31
- * post_title: (string) post title
32
- * post_excerpt: (string) post excerpt
33
- * post_status: (string) post status
34
- * post_name: (string) post slug
35
- * post_parent: (int) post parent id. Used for page or hierarchical post type.
36
- * menu_order: (int)
37
- * post_type: (string) post type
38
- * post_category: (string, comma divided) slug of post categories
39
- * post_tags: (string, comma divided) name of post tags
40
- * {custom_field}: (string) any other column labels used as custom field
41
- * {tax_$taxonomy}: (string, comma divided) any field prefixed with tax_ in the "custom_field" area will be used as a custom taxonomy. Taxonomy must already exist. Entries are names, not slugs
42
 
43
  = Advanced Custom Fields plugin integrate =
44
  If advanced custom field key is exists, importer will trying to use [update_field](http://www.advancedcustomfields.com/resources/functions/update_field/) function instead of built-in add_post_meta function.
@@ -58,6 +58,8 @@ Add star and read future issues about rs-csv-importer on [GitHub](https://github
58
 
59
  == Changelog ==
60
 
 
 
61
  = 0.4.1 =
62
  * Version fix
63
  = 0.4 =
3
  Tags: importer, csv, acf
4
  Requires at least: 3.0
5
  Tested up to: 3.6.1
6
+ Stable tag: 0.4.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
23
  Contains CSV file sample in `/wp-content/plugins/really-simple-csv-importer/sample` directory.
24
 
25
  = Available column names and values: =
26
+ * `ID` or `post_id`: (int) post id.
27
  This value is not required. The post ID is already exists in your blog, importer will update that post data. If the ID is not exists, importer will trying to create a new post with suggested ID.
28
+ * `post_author`: (login or ID) author
29
+ * `post_date`: (string) publish date
30
+ * `post_content`: (string) post content
31
+ * `post_title`: (string) post title
32
+ * `post_excerpt`: (string) post excerpt
33
+ * `post_status`: (string) post status
34
+ * `post_name`: (string) post slug
35
+ * `post_parent`: (int) post parent id. Used for page or hierarchical post type.
36
+ * `menu_order`: (int)
37
+ * `post_type`: (string) post type
38
+ * `post_category`: (string, comma divided) slug of post categories
39
+ * `post_tags`: (string, comma divided) name of post tags
40
+ * `{custom_field}`: (string) any other column labels used as custom field
41
+ * `{tax_$taxonomy}`: (string, comma divided) any field prefixed with tax_ in the "custom_field" area will be used as a custom taxonomy. Taxonomy must already exist. Entries are names, not slugs
42
 
43
  = Advanced Custom Fields plugin integrate =
44
  If advanced custom field key is exists, importer will trying to use [update_field](http://www.advancedcustomfields.com/resources/functions/update_field/) function instead of built-in add_post_meta function.
58
 
59
  == Changelog ==
60
 
61
+ = 0.4.2 =
62
+ * Post title bug fix
63
  = 0.4.1 =
64
  * Version fix
65
  = 0.4 =
rs-csv-importer.php CHANGED
@@ -7,7 +7,7 @@ Author: Takuro Hishikawa, wokamoto
7
  Author URI: http://notnil-creative.com/
8
  Text Domain: rs-csv-importer
9
  License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
- Version: 0.4.1
11
  */
12
 
13
  if ( !defined('WP_LOAD_IMPORTERS') )
@@ -205,7 +205,10 @@ class RS_CSV_Importer extends WP_Importer {
205
  }
206
 
207
  // (string) post title
208
- $post['post_title'] = $h->get_data($this,$data,'post_title');
 
 
 
209
 
210
  // (string) post content
211
  $post_content = $h->get_data($this,$data,'post_content');
@@ -272,9 +275,9 @@ class RS_CSV_Importer extends WP_Importer {
272
 
273
  $result = $this->save_post($post,$meta,$tax,$is_update);
274
  if (!$result) {
275
- echo '<li>'.sprintf(__('An error occurred during processing %s', 'rs-csv-importer'), esc_html($post['post_title'])).'</li>';
276
  } else {
277
- echo '<li>'.esc_html($post['post_title']).'</li>';
278
  }
279
  }
280
  }
7
  Author URI: http://notnil-creative.com/
8
  Text Domain: rs-csv-importer
9
  License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
+ Version: 0.4.2
11
  */
12
 
13
  if ( !defined('WP_LOAD_IMPORTERS') )
205
  }
206
 
207
  // (string) post title
208
+ $post_title = $h->get_data($this,$data,'post_title');
209
+ if ($post_title) {
210
+ $post['post_title'] = $post_title;
211
+ }
212
 
213
  // (string) post content
214
  $post_content = $h->get_data($this,$data,'post_content');
275
 
276
  $result = $this->save_post($post,$meta,$tax,$is_update);
277
  if (!$result) {
278
+ echo '<li>'.sprintf(__('An error occurred during processing %s', 'rs-csv-importer'), esc_html($post_title)).'</li>';
279
  } else {
280
+ echo '<li>'.esc_html($post_title).'</li>';
281
  }
282
  }
283
  }