|
1 | 1 | <?php
|
2 |
| - |
3 | 2 | /**
|
4 |
| - * @author Andy Clark |
5 |
| - * @copyright 2013 |
6 | 3 | * A data object representing the data to be added into Wordpress
|
7 | 4 | */
|
8 | 5 |
|
@@ -44,22 +41,23 @@ function import() {
|
44 | 41 | $post_date = $this->published;
|
45 | 42 | $post_content = $this->content;
|
46 | 43 | $post_title = $this->title;
|
| 44 | + $post_author = $this->author; |
47 | 45 | $post_status = $this->isDraft ? 'draft' : 'publish';
|
48 | 46 | //AGC:24/10/2013 Turn off the pingbacks
|
49 |
| - $post_pingback = Blogger_Import::POST_PINGBACK; |
| 47 | + $post_pingback = Blogger_Importer::POST_PINGBACK; |
50 | 48 |
|
51 | 49 | // N.B. Clean up of $post_content is now part of the sanitize class
|
52 | 50 | // Check for duplication part of calling function
|
53 |
| - $post = compact('post_date', 'post_content', 'post_title', 'post_status', 'post_pingback'); |
| 51 | + $post = compact('post_date', 'post_content', 'post_author', 'post_title', 'post_status', 'post_pingback'); |
54 | 52 |
|
55 | 53 | $post_id = wp_insert_post($post);
|
56 | 54 | if (is_wp_error($post_id))
|
57 | 55 | return $post_id;
|
58 |
| - |
| 56 | + |
59 | 57 | wp_create_categories(array_map('addslashes', $this->categories), $post_id);
|
60 | 58 |
|
61 | 59 | add_post_meta($post_id, 'blogger_blog', $this->blogurl, true);
|
62 |
| - add_post_meta($post_id, 'blogger_author', $this->author, true); |
| 60 | + add_post_meta($post_id, 'blogger_author', $this->bloggerauthor, true); |
63 | 61 |
|
64 | 62 | if (!$this->isDraft && isset($this->bookmark))
|
65 | 63 | add_post_meta($post_id, 'blogger_permalink', $this->bookmark, true);
|
|
0 commit comments