Ticket #4376: 4376.diff
File 4376.diff, 2.9 KB (added by , 17 years ago) |
---|
-
wp-admin/export.php
193 193 $where = "WHERE ID IN (".join(',', $next_posts).")"; 194 194 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); 195 195 foreach ($posts as $post) { 196 setup_postdata($post); ?> 196 setup_postdata($post); 197 198 // Strip Protected or Private prefixes from the title. 199 $post_title = get_the_title_rss(); 200 if ( !empty($post->post_password) ) 201 $post_title = str_replace( sprintf(__('Protected: %s'), ''), '', $post_title); 202 else if ( 'private' == $post->post_status ) 203 $post_title = str_replace( sprintf(__('Private: %s'), ''), '', $post_title); 204 ?> 197 205 <item> 198 <title><?php the_title_rss()?></title>206 <title><?php echo $post_title; ?></title> 199 207 <link><?php the_permalink_rss() ?></link> 200 208 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate> 201 209 <dc:creator><?php the_author() ?></dc:creator> … … 214 222 <wp:post_parent><?php echo $post->post_parent; ?></wp:post_parent> 215 223 <wp:menu_order><?php echo $post->menu_order; ?></wp:menu_order> 216 224 <wp:post_type><?php echo $post->post_type; ?></wp:post_type> 225 <wp:post_password><?php echo $post->post_password; ?></wp:post_password> 217 226 <?php 218 227 $postmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID"); 219 228 if ( $postmeta ) { -
wp-admin/import/wordpress.php
278 278 $post_parent = $this->get_tag( $post, 'wp:post_parent' ); 279 279 $menu_order = $this->get_tag( $post, 'wp:menu_order' ); 280 280 $post_type = $this->get_tag( $post, 'wp:post_type' ); 281 $post_password = $this->get_tag( $post, 'wp:post_password' ); 281 282 $guid = $this->get_tag( $post, 'guid' ); 282 283 $post_author = $this->get_tag( $post, 'dc:creator' ); 283 284 … … 312 313 313 314 $post_author = $this->checkauthor($post_author); //just so that if a post already exists, new users are not created by checkauthor 314 315 315 $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' );316 $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', 'post_password'); 316 317 $comment_post_ID = $post_id = wp_insert_post($postdata); 317 318 318 319 // Memorize old and new ID.