Use get_search_query() in feed-rss2-comments.php. Props SergeyBiryukov. fixes #21365

git-svn-id: http://core.svn.wordpress.org/trunk@21332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2012-07-25 18:04:17 +00:00
parent f6b8c4779a
commit 29e6ade734
2 changed files with 6 additions and 6 deletions

View File

@ -16,11 +16,11 @@ echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>'
>
<title type="text"><?php
if ( is_singular() )
printf(ent2ncr(__('Comments on %s')), get_the_title_rss());
printf( ent2ncr( __( 'Comments on %s' ) ), get_the_title_rss() );
elseif ( is_search() )
printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss( 'name' ), get_search_query() );
printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
else
printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
printf( ent2ncr( __( 'Comments for %s' ) ), get_bloginfo_rss( 'name' ) . get_wp_title_rss() );
?></title>
<subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle>

View File

@ -19,11 +19,11 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
<channel>
<title><?php
if ( is_singular() )
printf(ent2ncr(__('Comments on: %s')), get_the_title_rss());
printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() );
elseif ( is_search() )
printf(ent2ncr(__('Comments for %s searching on %s')), get_bloginfo_rss( 'name' ), esc_attr($wp_query->query_vars['s']));
printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
else
printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
printf( ent2ncr( __( 'Comments for %s' ) ), get_bloginfo_rss( 'name' ) . get_wp_title_rss() );
?></title>
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
<link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>