Make WordPress Core

Changeset 18716


Ignore:
Timestamp:
09/19/2011 12:39:59 PM (13 years ago)
Author:
westi
Message:

Set up the post global variable in the comment feed loops so that any calls to post related template tags work correctly.
Ensures that atom feeds show threading for top-level comments correctly.
Fixes #14908 props solarissmoke and SergeyBiryukov.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r14950 r18716  
    4343<?php
    4444if ( have_comments() ) : while ( have_comments() ) : the_comment();
    45     $comment_post = get_post($comment->comment_post_ID);
    46     get_post_custom($comment_post->ID);
     45    $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
    4746?>
    4847    <entry>
  • trunk/wp-includes/feed-rss2-comments.php

    r13113 r18716  
    3535<?php
    3636if ( have_comments() ) : while ( have_comments() ) : the_comment();
    37     $comment_post = get_post($comment->comment_post_ID);
    38     get_post_custom($comment_post->ID);
     37    $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
    3938?>
    4039    <item>
Note: See TracChangeset for help on using the changeset viewer.