Login: On the single site login screen, match the logo link text with the title.

Previously, the (W) logo on the single site login screen linked to wordpress.org, with an appropriate `title` attribute, but the link text was the blog name.

To fix this discrepency, the link text is now the same as the `title` attribute.

Props pento, obrienlabs, afercia, flixos90, lukecavanagh, and the infinite stack of bikesheds that WordPress is balanced upon.
Fixes #34625.


Built from https://develop.svn.wordpress.org/trunk@41843


git-svn-id: http://core.svn.wordpress.org/trunk@41677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2017-10-12 04:57:46 +00:00
parent da565a20b9
commit a9d38090ac
2 changed files with 12 additions and 2 deletions

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta1-41842';
$wp_version = '4.9-beta1-41843';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -135,6 +135,16 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
*/
$login_header_title = apply_filters( 'login_headertitle', $login_header_title );
/*
* To match the URL/title set above, Multisite sites have the blog name,
* while single sites get the header title.
*/
if ( is_multisite() ) {
$login_header_text = bloginfo( 'name' );
} else {
$login_header_text = $login_header_title;
}
$classes = array( 'login-action-' . $action, 'wp-core-ui' );
if ( is_rtl() )
$classes[] = 'rtl';
@ -171,7 +181,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
do_action( 'login_header' );
?>
<div id="login">
<h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
<h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>" tabindex="-1"><?php echo $login_header_text; ?></a></h1>
<?php
unset( $login_header_url, $login_header_title );