From 0826f08315534df2d55ab7ee46dddd0eaebd526d Mon Sep 17 00:00:00 2001 From: westi Date: Mon, 19 Sep 2011 12:39:59 +0000 Subject: [PATCH] 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 --- wp-includes/feed-atom-comments.php | 3 +-- wp-includes/feed-rss2-comments.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/feed-atom-comments.php b/wp-includes/feed-atom-comments.php index e4a39d80bd..aca98bdb37 100644 --- a/wp-includes/feed-atom-comments.php +++ b/wp-includes/feed-atom-comments.php @@ -42,8 +42,7 @@ echo '' comment_post_ID); - get_post_custom($comment_post->ID); + $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID ); ?> <?php diff --git a/wp-includes/feed-rss2-comments.php b/wp-includes/feed-rss2-comments.php index 74715b80e1..26d3325d57 100644 --- a/wp-includes/feed-rss2-comments.php +++ b/wp-includes/feed-rss2-comments.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