mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-11 22:29:48 +01:00
Force a separator in get_wp_title_rss() if it was inadvertently filtered out by the theme.
fixes #22362. Built from https://develop.svn.wordpress.org/trunk@28921 git-svn-id: http://core.svn.wordpress.org/trunk@28720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8dcf86f94d
commit
706f85d814
@ -93,13 +93,20 @@ function get_default_feed() {
|
|||||||
*
|
*
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*
|
*
|
||||||
* @param string $sep Optional.How to separate the title. See wp_title() for more info.
|
* @param string $sep Optional. How to separate the title. See wp_title() for more info.
|
||||||
* @return string Error message on failure or blog title on success.
|
* @return string Error message on failure or blog title on success.
|
||||||
*/
|
*/
|
||||||
function get_wp_title_rss($sep = '»') {
|
function get_wp_title_rss( $sep = '»' ) {
|
||||||
$title = wp_title($sep, false);
|
$title = wp_title( $sep, false );
|
||||||
if ( is_wp_error( $title ) )
|
|
||||||
|
if ( is_wp_error( $title ) ) {
|
||||||
return $title->get_error_message();
|
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.
|
* Filter the blog title for use as the feed title.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user