diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index a4a126bc4..a6c07d3bf 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -462,7 +462,7 @@ function get_comment_link( $comment = null, $args = array() ) { if ( '' === $args['per_page'] && get_option('page_comments') ) $args['per_page'] = get_option('comments_per_page'); - if ( empty($args['per_page']) ) { + if ( empty($args['per_page']) || is_feed() ) { $args['per_page'] = 0; $args['page'] = 0; } diff --git a/wp-includes/feed-atom-comments.php b/wp-includes/feed-atom-comments.php index c107cafff..d1700b0d1 100644 --- a/wp-includes/feed-atom-comments.php +++ b/wp-includes/feed-atom-comments.php @@ -64,7 +64,7 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment(); - + @@ -79,7 +79,7 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment(); $parent_comment = get_comment($comment->comment_parent); // The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, its more important that they both use the same system ?> - + comment_ID, $comment_post->ID); ?> diff --git a/wp-includes/feed.php b/wp-includes/feed.php index da451bac2..de94736bf 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -223,9 +223,11 @@ function the_permalink_rss() { * @package WordPress * @subpackage Feed * @since unknown + * + * @param int|object $comment_id Optional comment object or id. Defaults to global comment object. */ -function comment_guid() { - echo get_comment_guid(); +function comment_guid($comment_id = null) { + echo get_comment_guid($comment_id); } /** @@ -235,10 +237,11 @@ function comment_guid() { * @subpackage Feed * @since unknown * + * @param int|object $comment_id Optional comment object or id. Defaults to global comment object. * @return bool|string false on failure or guid for comment on success. */ -function get_comment_guid() { - global $comment; +function get_comment_guid($comment_id = null) { + $comment = get_comment($comment_id); if ( !is_object($comment) ) return false;