Put search string into <title> of search results page. Fixes #9103 props DD32.
git-svn-id: https://develop.svn.wordpress.org/trunk@10660 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c40eac2fa5
commit
8b613d0854
|
@ -385,6 +385,7 @@ function wp_title($sep = '»', $display = true, $seplocation = '') {
|
||||||
$year = get_query_var('year');
|
$year = get_query_var('year');
|
||||||
$monthnum = get_query_var('monthnum');
|
$monthnum = get_query_var('monthnum');
|
||||||
$day = get_query_var('day');
|
$day = get_query_var('day');
|
||||||
|
$search = get_query_var('s');
|
||||||
$title = '';
|
$title = '';
|
||||||
|
|
||||||
$t_sep = '%WP_TITILE_SEP%'; // Temporary separator, for accurate flipping, if necessary
|
$t_sep = '%WP_TITILE_SEP%'; // Temporary separator, for accurate flipping, if necessary
|
||||||
|
@ -456,6 +457,11 @@ function wp_title($sep = '»', $display = true, $seplocation = '') {
|
||||||
$term = $term->name;
|
$term = $term->name;
|
||||||
$title = "$tax$t_sep$term";
|
$title = "$tax$t_sep$term";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//If it's a search
|
||||||
|
if ( is_search() ) {
|
||||||
|
$title = sprintf(__('Search Results %s %s'), $t_sep, strip_tags($search));
|
||||||
|
}
|
||||||
|
|
||||||
if ( is_404() ) {
|
if ( is_404() ) {
|
||||||
$title = __('Page not found');
|
$title = __('Page not found');
|
||||||
|
|
Loading…
Reference in New Issue