Make WordPress Core

Ticket #48831: 48831.3.diff

File 48831.3.diff, 2.0 KB (added by sabernhardt, 5 years ago)

check that filter returns true and that the page is not an interim login

  • src/wp-admin/css/login.css

     
    55        padding: 0;
    66}
    77
     8.admin-bar {
     9        height: 100% - var(--wp-admin--admin-bar--height, 0px);
     10}
     11
    812body {
    913        background: #f0f0f1;
    1014        min-width: 0;
  • src/wp-includes/css/admin-bar.css

     
    5454#wpadminbar a,
    5555#wpadminbar a:hover,
    5656#wpadminbar a img,
    57 #wpadminbar a img:hover {
     57#wpadminbar a img:hover,
     58#wpadminbar form {
    5859        border: none;
    5960        text-decoration: none;
    6061        background: none;
     
    653654        height: 24px;
    654655        width: 24px;
    655656        max-width: none;
     657        min-height: 24px;
    656658        padding: 0 3px 0 24px;
    657659        margin: 0;
    658660        color: #c3c4c7;
  • src/wp-login.php

     
    4747
    4848        add_action( 'login_head', 'wp_login_viewport_meta' );
    4949
     50        // Add toolbar if show_admin_bar filter returns true. Filter is documented in wp-includes/admin-bar.php.
     51        $show_toolbar = apply_filters( 'show_admin_bar', false ) && ! $interim_login;
     52        if ( $show_toolbar ) {
     53                add_action( 'login_head', '_wp_admin_bar_init' );
     54                add_action( 'login_header', 'wp_admin_bar_render', 0 );
     55        }
     56
    5057        if ( ! is_wp_error( $wp_error ) ) {
    5158                $wp_error = new WP_Error();
    5259        }
     
    8794        $login_title = apply_filters( 'login_title', $login_title, $title );
    8895
    8996        ?><!DOCTYPE html>
    90         <html <?php language_attributes(); ?>>
     97        <html <?php language_attributes(); if ( $show_toolbar ) { echo ' class="admin-bar"'; } ?>>
    9198        <head>
    9299        <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
    93100        <title><?php echo $login_title; ?></title>