From 5b22db23d180f0f4edae28a3a1f0091d1f1cf275 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 6 Feb 2008 22:33:21 +0000 Subject: [PATCH] Make RSS 2.0 comment feed GUIDs immutable. fixes #5072 git-svn-id: http://svn.automattic.com/wordpress/trunk@6742 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/feed-rss2-comments.php | 2 +- wp-includes/feed.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/wp-includes/feed-rss2-comments.php b/wp-includes/feed-rss2-comments.php index 751772f370..f333984933 100644 --- a/wp-includes/feed-rss2-comments.php +++ b/wp-includes/feed-rss2-comments.php @@ -47,7 +47,7 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment(); - + post_password) && $_COOKIE['wp-postpass'] != $comment_post->post_password) : ?> ]]> diff --git a/wp-includes/feed.php b/wp-includes/feed.php index 2734f88a2d..7c8766439a 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -79,6 +79,19 @@ function the_permalink_rss() { } +function comment_guid() { + echo get_comment_guid(); +} + +function get_comment_guid() { + global $comment; + + if ( !is_object($comment) ) + return false; + + return get_the_guid($comment->comment_post_ID) . '#comment-' . $comment->comment_ID; +} + function comment_link() { echo get_comment_link(); }