Make RSS 2.0 comment feed GUIDs immutable. fixes #5072

git-svn-id: https://develop.svn.wordpress.org/trunk@6742 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2008-02-06 22:33:21 +00:00
parent 55be48f97f
commit 7a2d635909
2 changed files with 14 additions and 1 deletions

View File

@ -47,7 +47,7 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment();
<link><?php comment_link() ?></link>
<dc:creator><?php echo get_comment_author_rss() ?></dc:creator>
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate>
<guid><?php comment_link() ?></guid>
<guid isPermaLink="false"><?php comment_guid() ?></guid>
<?php if (!empty($comment_post->post_password) && $_COOKIE['wp-postpass'] != $comment_post->post_password) : ?>
<description><?php _e('Protected Comments: Please enter your password to view comments.'); ?></description>
<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>

View File

@ -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();
}