get_wp_title_rss

The timeline below displays how wordpress function get_wp_title_rss has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Retrieves the blog title for the feed title.
 *
 * @since 2.2.0
 * @since 4.4.0 The optional `$sep` parameter was deprecated and renamed to `$deprecated`.
 *
 * @param string $deprecated Unused.
 * @return string The document title.
 */
function get_wp_title_rss($deprecated = '–')
{
    if ('–' !== $deprecated) {
        /* translators: %s: 'document_title_separator' filter name. */
        _deprecated_argument(__FUNCTION__, '4.4.0', sprintf(__('Use the %s filter instead.'), '<code>document_title_separator</code>'));
    }
    /**
     * Filters the blog title for use as the feed title.
     *
     * @since 2.2.0
     * @since 4.4.0 The `$sep` parameter was deprecated and renamed to `$deprecated`.
     *
     * @param string $title      The current blog title.
     * @param string $deprecated Unused.
     */
    return apply_filters('get_wp_title_rss', wp_get_document_title(), $deprecated);
}

WordPress Version: 5.3

/**
 * Retrieve the blog title for the feed title.
 *
 * @since 2.2.0
 * @since 4.4.0 The optional `$sep` parameter was deprecated and renamed to `$deprecated`.
 *
 * @param string $deprecated Unused..
 * @return string The document title.
 */
function get_wp_title_rss($deprecated = '&#8211;')
{
    if ('&#8211;' !== $deprecated) {
        /* translators: %s: 'document_title_separator' filter name. */
        _deprecated_argument(__FUNCTION__, '4.4.0', sprintf(__('Use the %s filter instead.'), '<code>document_title_separator</code>'));
    }
    /**
     * Filters the blog title for use as the feed title.
     *
     * @since 2.2.0
     * @since 4.4.0 The `$sep` parameter was deprecated and renamed to `$deprecated`.
     *
     * @param string $title      The current blog title.
     * @param string $deprecated Unused.
     */
    return apply_filters('get_wp_title_rss', wp_get_document_title(), $deprecated);
}

WordPress Version: 4.6

/**
 * Retrieve the blog title for the feed title.
 *
 * @since 2.2.0
 * @since 4.4.0 The optional `$sep` parameter was deprecated and renamed to `$deprecated`.
 *
 * @param string $deprecated Unused..
 * @return string The document title.
 */
function get_wp_title_rss($deprecated = '&#8211;')
{
    if ('&#8211;' !== $deprecated) {
        /* translators: %s: 'document_title_separator' filter name */
        _deprecated_argument(__FUNCTION__, '4.4.0', sprintf(__('Use the %s filter instead.'), '<code>document_title_separator</code>'));
    }
    /**
     * Filters the blog title for use as the feed title.
     *
     * @since 2.2.0
     * @since 4.4.0 The `$sep` parameter was deprecated and renamed to `$deprecated`.
     *
     * @param string $title      The current blog title.
     * @param string $deprecated Unused.
     */
    return apply_filters('get_wp_title_rss', wp_get_document_title(), $deprecated);
}

WordPress Version: 4.4

/**
 * Retrieve the blog title for the feed title.
 *
 * @since 2.2.0
 * @since 4.4.0 The optional `$sep` parameter was deprecated and renamed to `$deprecated`.
 *
 * @param string $deprecated Unused..
 * @return string The document title.
 */
function get_wp_title_rss($deprecated = '&#8211;')
{
    if ('&#8211;' !== $deprecated) {
        /* translators: %s: 'document_title_separator' filter name */
        _deprecated_argument(__FUNCTION__, '4.4.0', sprintf(__('Use the %s filter instead.'), '<code>document_title_separator</code>'));
    }
    /**
     * Filter the blog title for use as the feed title.
     *
     * @since 2.2.0
     * @since 4.4.0 The `$sep` parameter was deprecated and renamed to `$deprecated`.
     *
     * @param string $title      The current blog title.
     * @param string $deprecated Unused.
     */
    return apply_filters('get_wp_title_rss', wp_get_document_title(), $deprecated);
}

WordPress Version: 4.0

/**
 * Retrieve the blog title for the feed title.
 *
 * @since 2.2.0
 *
 * @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 = '&#187;')
{
    $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.
     *
     * @since 2.2.0
     *
     * @param string $title The current blog title.
     * @param string $sep   Separator used by wp_title().
     */
    $title = apply_filters('get_wp_title_rss', $title, $sep);
    return $title;
}

WordPress Version: 3.9

/**
 * Retrieve the blog title for the feed title.
 *
 * @since 2.2.0
 *
 * @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 = '&#187;')
{
    $title = wp_title($sep, false);
    if (is_wp_error($title)) {
        return $title->get_error_message();
    }
    /**
     * Filter the blog title for use as the feed title.
     *
     * @since 2.2.0
     *
     * @param string $title The current blog title.
     * @param string $sep   Separator used by wp_title().
     */
    $title = apply_filters('get_wp_title_rss', $title, $sep);
    return $title;
}

WordPress Version: 3.7

/**
 * Retrieve the blog title for the feed title.
 *
 * @package WordPress
 * @subpackage Feed
 * @since 2.2.0
 * @uses apply_filters() Calls 'get_wp_title_rss' hook on title.
 * @uses wp_title() See function for $sep parameter usage.
 *
 * @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 = '&#187;')
{
    $title = wp_title($sep, false);
    if (is_wp_error($title)) {
        return $title->get_error_message();
    }
    $title = apply_filters('get_wp_title_rss', $title, $sep);
    return $title;
}