Add threaded comment info to atom feed. Props dtsn. fixes #8292
git-svn-id: http://svn.automattic.com/wordpress/trunk@9818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f3e25312d9
commit
5783e5ff6e
|
@ -66,11 +66,20 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment();
|
||||||
<id><?php comment_link(); ?></id>
|
<id><?php comment_link(); ?></id>
|
||||||
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></updated>
|
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></updated>
|
||||||
<published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></published>
|
<published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></published>
|
||||||
<?php if (!empty($comment_post->post_password) && $_COOKIE['wp-postpass'] != $comment_post->post_password) : ?>
|
<?php if ( post_password_required() ) : ?>
|
||||||
<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content>
|
<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content>
|
||||||
<?php else : // post pass ?>
|
<?php else : // post pass ?>
|
||||||
<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
|
<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
|
||||||
<?php endif; // post pass
|
<?php endif; // post pass
|
||||||
|
// Return comment threading information (http://www.ietf.org/rfc/rfc4685.txt)
|
||||||
|
if ( $comment->comment_parent == 0 ) : // This comment is top level ?>
|
||||||
|
<thr:in-reply-to rel="<?php the_guid() ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
|
||||||
|
<?php else : // This comment is in reply to another comment
|
||||||
|
$parent_comment = get_comment($comment->comment_parent);
|
||||||
|
// 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
|
||||||
|
?>
|
||||||
|
<thr:in-reply-to rel="<?php echo get_comment_link($parent_comment) ?>" href="<?php echo get_comment_link($parent_comment) ?>" type="<?php bloginfo_rss('html_type'); ?>" />
|
||||||
|
<?php endif;
|
||||||
do_action('comment_atom_entry', $comment->comment_ID, $comment_post->ID);
|
do_action('comment_atom_entry', $comment->comment_ID, $comment_post->ID);
|
||||||
?>
|
?>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
Loading…
Reference in New Issue