mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-24 07:14:28 +00:00
Comment feed fixes from David House. fixes #2570
git-svn-id: https://develop.svn.wordpress.org/trunk@3644 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -31,7 +31,7 @@ if (have_posts()) :
|
||||
$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
|
||||
comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
|
||||
$wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
|
||||
LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '$id'
|
||||
LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '" . get_the_ID() . "'
|
||||
AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish'
|
||||
AND post_date_gmt < '" . gmdate("Y-m-d H:i:59") . "'
|
||||
ORDER BY comment_date_gmt DESC LIMIT " . get_settings('posts_per_rss') );
|
||||
@@ -46,6 +46,7 @@ if (have_posts()) :
|
||||
// this line is WordPress' motor, do not delete it.
|
||||
if ($comments) {
|
||||
foreach ($comments as $comment) {
|
||||
$GLOBALS['comment'] =& $comment;
|
||||
// Some plugins may need to know the metadata
|
||||
// associated with this comment's post:
|
||||
get_post_custom($comment->comment_post_ID);
|
||||
@@ -77,7 +78,7 @@ if (have_posts()) :
|
||||
?>
|
||||
</item>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
endwhile; endif;
|
||||
|
||||
Reference in New Issue
Block a user