X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0461a5f2e55c8d5f1fde96ca2e83117152573c7d..9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f:/wp-includes/feed.php diff --git a/wp-includes/feed.php b/wp-includes/feed.php index c77abd52..560dc61e 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -93,13 +93,20 @@ function get_default_feed() { * * @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. */ -function get_wp_title_rss($sep = '»') { - $title = wp_title($sep, false); - if ( is_wp_error( $title ) ) +function get_wp_title_rss( $sep = '»' ) { + $title = wp_title( $sep, false ); + + 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. * @@ -177,7 +184,7 @@ function get_the_content_feed($feed_type = null) { if ( !$feed_type ) $feed_type = get_default_feed(); - /** This filter is documented in wp-admin/post-template.php */ + /** This filter is documented in wp-includes/post-template.php */ $content = apply_filters( 'the_content', get_the_content() ); $content = str_replace(']]>', ']]>', $content); /** @@ -389,8 +396,7 @@ function get_the_category_rss($type = null) { if ( 'rdf' == $type ) $the_list .= "\t\t\n"; elseif ( 'atom' == $type ) - /** This filter is documented in wp-includes/feed.php */ - $the_list .= sprintf( '', esc_attr( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), esc_attr( $cat_name ) ); + $the_list .= sprintf( '', esc_attr( get_bloginfo_rss( 'url' ) ), esc_attr( $cat_name ) ); else $the_list .= "\t\t\n"; }