Make WordPress Core


Ignore:
Timestamp:
02/13/2008 06:29:10 PM (17 years ago)
Author:
ryan
Message:

Improve metadata for atom comment search feeds. Props ionfish. fixes #5493

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/feed-atom-comments.php

    r6726 r6819  
    1818            printf(__('Comments on: %s'), get_the_title_rss());
    1919        elseif ( is_search() )
    20             printf(__('Comments for %s searching on %s'), get_bloginfo_rss( 'name' ), attribute_escape($wp_query->query_vars['s']));
     20            printf(__('Comments for %1$s searching on %2$s'), get_bloginfo_rss( 'name' ), attribute_escape(get_search_query()));
    2121        else
    2222            printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
     
    2828
    2929<?php if ( is_singular() ) { ?>
    30     <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_comments_link() ?>" />
     30    <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_comments_link(); ?>" />
    3131    <link rel="self" type="application/atom+xml" href="<?php echo get_post_comments_feed_link('', 'atom'); ?>" />
    3232    <id><?php echo get_post_comments_feed_link('', 'atom'); ?></id>
     33<?php } elseif(is_search()) { ?>
     34    <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_option('home') . '?s=' . attribute_escape(get_search_query()); ?>" />
     35    <link rel="self" type="application/atom+xml" href="<?php echo get_search_comments_feed_link('', 'atom'); ?>" />
     36    <id><?php echo get_search_comments_feed_link('', 'atom'); ?></id>
    3337<?php } else { ?>
    3438    <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('home'); ?>" />
Note: See TracChangeset for help on using the changeset viewer.