diff --git a/wp-admin/export.php b/wp-admin/export.php index 7dc26fc21e..ed5b6a535c 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -177,6 +177,7 @@ function wxr_category_description($c) { <wp:post_name><?php echo $post->post_name; ?></wp:post_name> <wp:status><?php echo $post->post_status; ?></wp:status> <wp:post_parent><?php echo $post->post_parent; ?></wp:post_parent> +<wp:menu_order><?php echo $post->menu_order; ?></wp:menu_order> <wp:post_type><?php echo $post->post_type; ?></wp:post_type> <?php $postmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID"); diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index b4ed583e80..472a1b38eb 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -220,7 +220,9 @@ class WP_Import { $comment_status = $this->get_tag( $post, 'wp:comment_status' ); $ping_status = $this->get_tag( $post, 'wp:ping_status' ); $post_status = $this->get_tag( $post, 'wp:status' ); + $post_name = $this->get_tag( $post, 'wp:post_name' ); $post_parent = $this->get_tag( $post, 'wp:post_parent' ); + $menu_order = $this->get_tag( $post, 'wp:menu_order' ); $post_type = $this->get_tag( $post, 'wp:post_type' ); $guid = $this->get_tag( $post, 'guid' ); $post_author = $this->get_tag( $post, 'dc:creator' ); @@ -249,7 +251,7 @@ class WP_Import { $post_author = $this->checkauthor($post_author); //just so that if a post already exists, new users are not created by checkauthor - $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt', 'guid', 'post_parent', 'post_type'); + $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'post_name', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt', 'guid', 'post_parent', 'menu_order', 'post_type'); $comment_post_ID = $post_id = wp_insert_post($postdata); // Add categories. if (0 != count($categories)) {