WordPress.org

Make WordPress Core

Changeset 46192


Ignore:
Timestamp:
09/19/2019 07:21:17 PM (4 weeks ago)
Author:
desrosj
Message:

Login and Registration: Detect JavaScript on the login screen.

This allows the login screen to be targeted with CSS when JavaScript is disabled.

Props Nikschavan.
Fixes #38088.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r45932 r46192  
    191191    ?>
    192192    </head>
    193     <body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
     193    <body class="login no-js <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
     194    <script type="text/javascript">
     195        document.body.className = document.body.className.replace('no-js','js');
     196    </script>
    194197    <?php
    195198    /**
Note: See TracChangeset for help on using the changeset viewer.