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. git-svn-id: https://develop.svn.wordpress.org/trunk@18716 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
814faf7f4f
commit
442590c211
@ -42,8 +42,7 @@ echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>'
|
||||
<?php do_action('comments_atom_head'); ?>
|
||||
<?php
|
||||
if ( have_comments() ) : while ( have_comments() ) : the_comment();
|
||||
$comment_post = get_post($comment->comment_post_ID);
|
||||
get_post_custom($comment_post->ID);
|
||||
$comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
|
||||
?>
|
||||
<entry>
|
||||
<title><?php
|
||||
|
@ -34,8 +34,7 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||
<?php do_action('commentsrss2_head'); ?>
|
||||
<?php
|
||||
if ( have_comments() ) : while ( have_comments() ) : the_comment();
|
||||
$comment_post = get_post($comment->comment_post_ID);
|
||||
get_post_custom($comment_post->ID);
|
||||
$comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
|
||||
?>
|
||||
<item>
|
||||
<title><?php
|
||||
|
Loading…
Reference in New Issue
Block a user