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: http://svn.automattic.com/wordpress/trunk@18716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
738904e996
commit
0826f08315
|
@ -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