diff options
author | 2011-04-20 02:39:24 +0300 | |
---|---|---|
committer | 2011-04-20 02:39:24 +0300 | |
commit | f7473515da3333b21b699f9c4b3c1674b7172271 (patch) | |
tree | 0616a2f980ddff7d069fd36653e222b64c9379a8 /plugins/wordpress-importer/parsers.php | |
parent | Improve sample entry for themes in the update-wordpress script (diff) | |
download | blogs-gentoo-f7473515da3333b21b699f9c4b3c1674b7172271.tar.gz blogs-gentoo-f7473515da3333b21b699f9c4b3c1674b7172271.tar.bz2 blogs-gentoo-f7473515da3333b21b699f9c4b3c1674b7172271.zip |
Update wordpress-importer and smart-youtube
Diffstat (limited to 'plugins/wordpress-importer/parsers.php')
-rw-r--r-- | plugins/wordpress-importer/parsers.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/wordpress-importer/parsers.php b/plugins/wordpress-importer/parsers.php index 17247296..87c3b9d9 100644 --- a/plugins/wordpress-importer/parsers.php +++ b/plugins/wordpress-importer/parsers.php @@ -157,6 +157,9 @@ class WXR_Parser_SimpleXML { $post['post_password'] = (string) $wp->post_password; $post['is_sticky'] = (int) $wp->is_sticky; + if ( isset($wp->attachment_url) ) + $post['attachment_url'] = (string) $wp->attachment_url; + foreach ( $item->category as $c ) { $att = $c->attributes(); if ( isset( $att['nicename'] ) ) @@ -211,7 +214,7 @@ class WXR_Parser_SimpleXML { */ class WXR_Parser_XML { var $wp_tags = array( - 'wp:post_id', 'wp:post_date', 'wp:post_date_gmt', 'wp:comment_status', 'wp:ping_status', + 'wp:post_id', 'wp:post_date', 'wp:post_date_gmt', 'wp:comment_status', 'wp:ping_status', 'wp:attachment_url', 'wp:status', 'wp:post_name', 'wp:post_parent', 'wp:menu_order', 'wp:post_type', 'wp:post_password', 'wp:is_sticky', 'wp:term_id', 'wp:category_nicename', 'wp:category_parent', 'wp:cat_name', 'wp:category_description', 'wp:tag_slug', 'wp:tag_name', 'wp:tag_description', 'wp:term_taxonomy', 'wp:term_parent', @@ -525,6 +528,10 @@ class WXR_Parser_Regex { 'menu_order', 'post_type', 'post_password', 'is_sticky' ); + $attachment_url = $this->get_tag( $post, 'wp:attachment_url' ); + if ( $attachment_url ) + $postdata['attachment_url'] = $attachment_url; + preg_match_all( '|<category domain="([^"]+?)" nicename="([^"]+?)">(.+?)</category>|is', $post, $terms, PREG_SET_ORDER ); foreach ( $terms as $t ) { $post_terms[] = array( @@ -551,6 +558,7 @@ class WXR_Parser_Regex { 'comment_approved' => $this->get_tag( $comment, 'wp:comment_approved' ), 'comment_type' => $this->get_tag( $comment, 'wp:comment_type' ), 'comment_parent' => $this->get_tag( $comment, 'wp:comment_parent' ), + 'comment_user_id' => $this->get_tag( $comment, 'wp:comment_user_id' ), ); } } |