Force a separator in get_wp_title_rss() if it was inadvertently filtered out by the theme.

fixes #22362.

git-svn-id: https://develop.svn.wordpress.org/trunk@28921 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-06-30 10:10:57 +00:00
parent 913392b9a9
commit 1d38109297

View File

@ -98,8 +98,15 @@ function get_default_feed() {
*/
function get_wp_title_rss( $sep = '»' ) {
$title = wp_title( $sep, false );
if ( is_wp_error( $title ) )
if ( is_wp_error( $title ) ) {
return $title->get_error_message();
}
if ( $title && $sep && ' ' !== substr( $title, 0, 1 ) ) {
$title = " $sep " . $title;
}
/**
* Filter the blog title for use as the feed title.
*