Ticket #3188: end_to_start_wp.diff
File end_to_start_wp.diff, 1.9 KB (added by , 19 years ago) |
---|
-
wp-includes/query.php
917 917 $where .= " AND (post_type = 'page')"; 918 918 } elseif ($this->is_single) { 919 919 $where .= " AND (post_type = 'post')"; 920 } elseif ('export' == $post_type) { 921 // don't extend the WHERE clause or limit it to post_type or post_status 920 922 } else { 921 923 $where .= " AND (post_type = '$post_type' AND (post_status = 'publish'"; 922 924 -
wp-admin/export.php
53 53 header("Content-Disposition: attachment; filename=$filename"); 54 54 header('Content-type: text/wxr+xml; charset=' . get_option('blog_charset'), true); 55 55 56 $ where = '';56 $author = 0; 57 57 if ( isset( $_GET['author'] ) && $_GET['author'] != 'all' ) { 58 $author_id = (int) $_GET['author']; 59 $where = " WHERE post_author = '$author_id' "; 58 $author = (int) $_GET['author']; 60 59 } 61 60 62 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC");61 $posts = query_posts('posts_per_page=-1&order=ASC&post_type=export&author='.$author); 63 62 ?> 64 63 <!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. --> 65 64 <!-- It contains information about your blog's posts, comments, and categories. --> … … 87 86 <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator> 88 87 <language><?php echo get_option('rss_language'); ?></language> 89 88 <?php do_action('rss2_head'); ?> 90 <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>89 <?php while (have_posts()) : the_post(); ?> 91 90 <item> 92 91 <title><?php the_title_rss() ?></title> 93 92 <link><?php permalink_single_rss() ?></link> … … 136 135 </wp:comment> 137 136 <?php } } ?> 138 137 </item> 139 <?php } }?>138 <?php endwhile; ?> 140 139 </channel> 141 140 </rss> 142 141 <?php