Make WordPress Core

Ticket #34625: 34625.2.patch

File 34625.2.patch, 1.7 KB (added by afercia, 10 years ago)
  • src/wp-login.php

     
    119119         */
    120120        $login_header_title = apply_filters( 'login_headertitle', $login_header_title );
    121121
     122        // The title attribute is deprecated and will be removed in a later version.
     123        if ( has_filter( 'login_headertitle' ) ) {
     124                // TODO: needs _deprecated_filter(), use _deprecated_function() as substitute for now.
     125                _deprecated_function( 'add_filter( login_headertitle )', '4.5.0', 'add_filter( login_headerlinktext )' );
     126                $login_header_link_text = get_bloginfo( 'name' );
     127        } else {
     128                // By default, make the hidden link text same as the title attribute.
     129                $login_header_link_text = $login_header_title;
     130        }
     131
     132        /**
     133         * Filter the hidden link text of the header logo.
     134         *
     135         * @since 4.5.0
     136         *
     137         * @param string $login_header_link_text Login header hidden link text.
     138         */
     139        $login_header_link_text = apply_filters( 'login_headerlinktext', $login_header_link_text );
     140
    122141        $classes = array( 'login-action-' . $action, 'wp-core-ui' );
    123142        if ( wp_is_mobile() )
    124143                $classes[] = 'mobile';
     
    149168        </head>
    150169        <body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
    151170        <div id="login">
    152                 <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>
     171                <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>" tabindex="-1"><?php esc_html_e( $login_header_link_text ); ?></a></h1>
    153172        <?php
    154173
    155174        unset( $login_header_url, $login_header_title );