Add support for sticky posts to the WXR exporter and importer. Fixes #10462 props josephscott.

git-svn-id: https://develop.svn.wordpress.org/trunk@11774 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2009-08-04 21:46:42 +00:00
parent 92cc16ae04
commit b2fce410d1
2 changed files with 12 additions and 1 deletions

View File

@@ -378,6 +378,7 @@ class WP_Import {
$menu_order = $this->get_tag( $post, 'wp:menu_order' );
$post_type = $this->get_tag( $post, 'wp:post_type' );
$post_password = $this->get_tag( $post, 'wp:post_password' );
$is_sticky = $this->get_tag( $post, 'wp:is_sticky' );
$guid = $this->get_tag( $post, 'guid' );
$post_author = $this->get_tag( $post, 'dc:creator' );
@@ -448,6 +449,9 @@ class WP_Import {
else {
printf(__('Importing post <em>%s</em>...'), stripslashes($post_title));
$comment_post_ID = $post_id = wp_insert_post($postdata);
if ( $post_id && $is_sticky == 1 )
stick_post( $post_id );
}
if ( is_wp_error( $post_id ) )