mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-23 08:41:24 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@41691 git-svn-id: http://core.svn.wordpress.org/trunk@41525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
63402326c1
commit
50e03e19af
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-41690';
|
||||
$wp_version = '4.9-alpha-41691';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
17
wp-login.php
17
wp-login.php
@ -55,7 +55,20 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
|
||||
if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) )
|
||||
add_action( 'login_head', 'wp_shake_js', 12 );
|
||||
|
||||
$separator = is_rtl() ? ' › ' : ' ‹ ';
|
||||
$login_title = get_bloginfo( 'name', 'display' );
|
||||
|
||||
/* translators: Login screen title. 1: Login screen name, 2: Network or site name */
|
||||
$login_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $login_title );
|
||||
|
||||
/**
|
||||
* Filters the title tag content for login page.
|
||||
*
|
||||
* @since 4.9.0
|
||||
*
|
||||
* @param string $login_title The page title, with extra context added.
|
||||
* @param string $title The original page title.
|
||||
*/
|
||||
$login_title = apply_filters( 'login_title', $login_title, $title );
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<!--[if IE 8]>
|
||||
@ -66,7 +79,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
|
||||
<!--<![endif]-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
||||
<title><?php echo $title . $separator . get_bloginfo( 'name', 'display' ); ?></title>
|
||||
<title><?php echo $login_title; ?></title>
|
||||
<?php
|
||||
|
||||
wp_enqueue_style( 'login' );
|
||||
|
Loading…
Reference in New Issue
Block a user