mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 05:34:07 +01:00
Add a login_body_class filter to login_header(). fixes #21133.
git-svn-id: http://core.svn.wordpress.org/trunk@22000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4e0c89c236
commit
71d750b450
10
wp-login.php
10
wp-login.php
@ -39,7 +39,7 @@ if ( force_ssl_admin() && ! is_ssl() ) {
|
|||||||
* @param WP_Error $wp_error Optional. WordPress Error Object
|
* @param WP_Error $wp_error Optional. WordPress Error Object
|
||||||
*/
|
*/
|
||||||
function login_header($title = 'Log In', $message = '', $wp_error = '') {
|
function login_header($title = 'Log In', $message = '', $wp_error = '') {
|
||||||
global $error, $interim_login, $current_site;
|
global $error, $interim_login, $current_site, $action;
|
||||||
|
|
||||||
// Don't index any of these forms
|
// Don't index any of these forms
|
||||||
add_action( 'login_head', 'wp_no_robots' );
|
add_action( 'login_head', 'wp_no_robots' );
|
||||||
@ -86,9 +86,15 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
|
|||||||
if ( $interim_login )
|
if ( $interim_login )
|
||||||
$login_header_url = '#';
|
$login_header_url = '#';
|
||||||
|
|
||||||
|
$classes = array( 'login-action-' . $action );
|
||||||
|
if ( wp_is_mobile() )
|
||||||
|
$classes[] = 'mobile';
|
||||||
|
if ( is_rtl() )
|
||||||
|
$classes[] = 'rtl';
|
||||||
|
$classes = apply_filters( 'login_body_class', $classes, $action );
|
||||||
?>
|
?>
|
||||||
</head>
|
</head>
|
||||||
<body class="login<?php if ( wp_is_mobile() ) echo ' mobile'; ?>">
|
<body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
||||||
<div id="login">
|
<div id="login">
|
||||||
<h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
|
<h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
|
||||||
<?php
|
<?php
|
||||||
|
Loading…
Reference in New Issue
Block a user