Fix id, self link and alternate link in Atom comment feeds. Props ionfish. fixes #5435

git-svn-id: http://svn.automattic.com/wordpress/trunk@6414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-12-19 18:25:22 +00:00
parent 22fc69ea24
commit 34780230f9

View File

@ -19,10 +19,16 @@ echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>'
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT')); ?></updated>
<?php the_generator( 'atom' ); ?>
<?php if ( is_singular() ) { ?>
<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_comments_link() ?>" />
<link rel="self" type="application/atom+xml" href="<?php echo get_post_comments_feed_link('', 'atom'); ?>" />
<id><?php echo get_post_comments_feed_link('', 'atom'); ?></id>
<?php } else { ?>
<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('home'); ?>" />
<link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />
<id><?php bloginfo_rss('comments_atom_url'); ?></id>
<?php } ?>
<?php
if ( have_comments() ) : while ( have_comments() ) : the_comment();