_wp_render_title_tag

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

WordPress Version: 4.4

/**
 * Displays title tag with content.
 *
 * @ignore
 * @since 4.1.0
 * @since 4.4.0 Improved title output replaced `wp_title()`.
 * @access private
 */
function _wp_render_title_tag()
{
    if (!current_theme_supports('title-tag')) {
        return;
    }
    echo '<title>' . wp_get_document_title() . '</title>' . "\n";
}

WordPress Version: 4.2

/**
 * Display title tag with contents.
 *
 * @ignore
 * @since 4.1.0
 * @access private
 *
 * @see wp_title()
 */
function _wp_render_title_tag()
{
    if (!current_theme_supports('title-tag')) {
        return;
    }
    // This can only work internally on wp_head.
    if (!did_action('wp_head') && !doing_action('wp_head')) {
        return;
    }
    echo '<title>' . wp_title('|', false, 'right') . "</title>\n";
}

WordPress Version: 4.1

/**
 * Display title tag with contents.
 *
 * @since 4.1.0
 * @access private
 * @internal
 *
 * @see wp_title()
 */
function _wp_render_title_tag()
{
    if (!current_theme_supports('title-tag')) {
        return;
    }
    // This can only work internally on wp_head.
    if (!did_action('wp_head') && !doing_action('wp_head')) {
        return;
    }
    echo '<title>' . wp_title('|', false, 'right') . "</title>\n";
}