Make WordPress Core

Changeset 10387


Ignore:
Timestamp:
01/20/2009 08:56:40 PM (16 years ago)
Author:
ryan
Message:

Use guid instead of link for atom comment IDs. fixes #8708 for 2.7

Location:
branches/2.7/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7/wp-includes/feed-atom-comments.php

    r10216 r10387  
    6565        </author>
    6666
    67         <id><?php comment_link(); ?></id>
     67        <id><?php comment_guid(); ?></id>
    6868        <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></updated>
    6969        <published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></published>
     
    8080    // 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
    8181?>
    82         <thr:in-reply-to ref="<?php echo get_comment_link($parent_comment) ?>" href="<?php echo get_comment_link($parent_comment) ?>" type="<?php bloginfo_rss('html_type'); ?>" />
     82        <thr:in-reply-to ref="<?php comment_guid($parent_comment) ?>" href="<?php echo get_comment_link($parent_comment) ?>" type="<?php bloginfo_rss('html_type'); ?>" />
    8383<?php endif;
    8484    do_action('comment_atom_entry', $comment->comment_ID, $comment_post->ID);
  • branches/2.7/wp-includes/feed.php

    r10333 r10387  
    224224 * @subpackage Feed
    225225 * @since unknown
    226  */
    227 function comment_guid() {
    228     echo get_comment_guid();
     226 *
     227 * @param int|object $comment_id Optional comment object or id. Defaults to global comment object.
     228 */
     229function comment_guid($comment_id = null) {
     230    echo get_comment_guid($comment_id);
    229231}
    230232
     
    236238 * @since unknown
    237239 *
     240 * @param int|object $comment_id Optional comment object or id. Defaults to global comment object.
    238241 * @return bool|string false on failure or guid for comment on success.
    239242 */
    240 function get_comment_guid() {
    241     global $comment;
     243function get_comment_guid($comment_id = null) {
     244    $comment = get_comment($comment_id);
    242245
    243246    if ( !is_object($comment) )
Note: See TracChangeset for help on using the changeset viewer.