Ticket #5493: search_comments_feed_fix.patch
File search_comments_feed_fix.patch, 1.7 KB (added by , 18 years ago) |
---|
-
wp-includes/feed-atom-comments.php
11 11 if ( is_singular() ) 12 12 printf(__('Comments on: %s'), get_the_title_rss()); 13 13 elseif ( is_search() ) 14 printf(__('Comments for % s searching on %s'), get_bloginfo_rss( 'name' ), attribute_escape($wp_query->query_vars['s']));14 printf(__('Comments for %1$s searching on %2$s'), get_bloginfo_rss( 'name' ), attribute_escape(get_search_query())); 15 15 else 16 16 printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss()); 17 17 ?></title> … … 21 21 <?php the_generator( 'atom' ); ?> 22 22 23 23 <?php if ( is_singular() ) { ?> 24 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_comments_link() ?>" />24 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_comments_link(); ?>" /> 25 25 <link rel="self" type="application/atom+xml" href="<?php echo get_post_comments_feed_link('', 'atom'); ?>" /> 26 26 <id><?php echo get_post_comments_feed_link('', 'atom'); ?></id> 27 <?php } elseif(is_search()) { ?> 28 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo get_option('home') . '?s=' . attribute_escape(get_search_query()); ?>" /> 29 <link rel="self" type="application/atom+xml" href="<?php echo get_search_comments_feed_link('', 'atom'); ?>" /> 30 <id><?php echo get_search_comments_feed_link('', 'atom'); ?></id> 27 31 <?php } else { ?> 28 32 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('home'); ?>" /> 29 33 <link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />