Make WordPress Core

Changeset 41691


Ignore:
Timestamp:
10/02/2017 10:59:25 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Login and Registration: Introduce login_title filter for the <title> tag content on login page.

The new filter mirrors the admin_title filter used on admin pages.

Props nishitlangaliya, henry.wright, SergeyBiryukov.
Fixes #40812.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r41690 r41691  
    5656        add_action( 'login_head', 'wp_shake_js', 12 );
    5757
    58     $separator = is_rtl() ? ' &rsaquo; ' : ' &lsaquo; ';
     58    $login_title = get_bloginfo( 'name', 'display' );
     59
     60    /* translators: Login screen title. 1: Login screen name, 2: Network or site name */
     61    $login_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $login_title );
     62
     63    /**
     64     * Filters the title tag content for login page.
     65     *
     66     * @since 4.9.0
     67     *
     68     * @param string $login_title The page title, with extra context added.
     69     * @param string $title       The original page title.
     70     */
     71    $login_title = apply_filters( 'login_title', $login_title, $title );
    5972
    6073    ?><!DOCTYPE html>
     
    6780    <head>
    6881    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    69     <title><?php echo $title . $separator . get_bloginfo( 'name', 'display' ); ?></title>
     82    <title><?php echo $login_title; ?></title>
    7083    <?php
    7184
Note: See TracChangeset for help on using the changeset viewer.