diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-04 16:44:15 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-04 16:44:15 +0000 |
commit | 7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc (patch) | |
tree | c6fd23b598f3994eddb18cb1c0f2e8d95ff054fa /wp-includes/feed-atom-comments.php | |
parent | f650f48c048bfbbb2ae702b6425d87e39358d748 (diff) | |
download | wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.gz wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.xz wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.zip |
Merged with WordPress 2.5, unstable, only for testing
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1218 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/feed-atom-comments.php')
-rw-r--r-- | wp-includes/feed-atom-comments.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/wp-includes/feed-atom-comments.php b/wp-includes/feed-atom-comments.php index ee9a73b..e7c3c7c 100644 --- a/wp-includes/feed-atom-comments.php +++ b/wp-includes/feed-atom-comments.php @@ -1,4 +1,10 @@ <?php +/** + * Atom Feed Template for displaying Atom Comments feed. + * + * @package WordPress + */ + header('Content-Type: application/atom+xml; charset=' . get_option('blog_charset'), true); echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>'; ?> @@ -11,18 +17,28 @@ echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>' if ( is_singular() ) printf(__('Comments on: %s'), get_the_title_rss()); elseif ( is_search() ) - printf(__('Comments for %s searching on %s'), get_bloginfo_rss( 'name' ), attribute_escape($wp_query->query_vars['s'])); + printf(__('Comments for %1$s searching on %2$s'), get_bloginfo_rss( 'name' ), attribute_escape(get_search_query())); else printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss()); ?></title> <subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle> <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT')); ?></updated> - <generator uri="http://wordpress.org/" version="<?php bloginfo('version'); ?>">WordPress</generator> + <?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 } elseif(is_search()) { ?> + <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_option('home') . '?s=' . attribute_escape(get_search_query()); ?>" /> + <link rel="self" type="application/atom+xml" href="<?php echo get_search_comments_feed_link('', 'atom'); ?>" /> + <id><?php echo get_search_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(); |