WordPress.org

Make WordPress Core

Changeset 6742


Ignore:
Timestamp:
02/06/08 22:33:21 (6 years ago)
Author:
markjaquith
Message:

Make RSS 2.0 comment feed GUIDs immutable. fixes #5072

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/feed-rss2-comments.php

    r6493 r6742  
    4848        <dc:creator><?php echo get_comment_author_rss() ?></dc:creator> 
    4949        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate> 
    50         <guid><?php comment_link() ?></guid> 
     50        <guid isPermaLink="false"><?php comment_guid() ?></guid> 
    5151<?php if (!empty($comment_post->post_password) && $_COOKIE['wp-postpass'] != $comment_post->post_password) : ?> 
    5252        <description><?php _e('Protected Comments: Please enter your password to view comments.'); ?></description> 
  • trunk/wp-includes/feed.php

    r6726 r6742  
    8080} 
    8181 
     82function comment_guid() { 
     83    echo get_comment_guid(); 
     84} 
     85 
     86function get_comment_guid() { 
     87    global $comment; 
     88 
     89    if ( !is_object($comment) ) 
     90        return false; 
     91 
     92    return get_the_guid($comment->comment_post_ID) . '#comment-' . $comment->comment_ID; 
     93} 
     94 
    8295function comment_link() { 
    8396    echo get_comment_link(); 
Note: See TracChangeset for help on using the changeset viewer.