Don't put revisions in the export

git-svn-id: https://develop.svn.wordpress.org/trunk@9104 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-10-08 23:49:46 +00:00
parent 638a41bf49
commit 7a05a094f0

View File

@ -264,6 +264,9 @@ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?' . ">\n";
$where = "WHERE ID IN (".join(',', $next_posts).")"; $where = "WHERE ID IN (".join(',', $next_posts).")";
$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC");
foreach ($posts as $post) { foreach ($posts as $post) {
// Don't export revisions. They bloat the export.
if ( 'revision' == $post->post_type )
continue;
setup_postdata($post); ?> setup_postdata($post); ?>
<item> <item>
<title><?php echo apply_filters('the_title_rss', $post->post_title); ?></title> <title><?php echo apply_filters('the_title_rss', $post->post_title); ?></title>