Make WordPress Core

Changeset 38739


Ignore:
Timestamp:
10/06/2016 03:51:53 PM (7 years ago)
Author:
helen
Message:

Login: Don't rely on wp_is_mobile() for functionality.

Making behavior changes based on some broad definition of what mobile is rarely, if ever, makes sense. Each bit of functionality should be more clearly targeted, whether that's for screen size, performance, or some kind of touch capability.

props akibjorklund.
see #33704.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/login.css

    r38152 r38739  
    217217}
    218218
    219 .mobile #login {
    220     padding: 20px 0;
    221 }
    222 
    223 .mobile #login form {
    224     margin-left: 0;
    225 }
    226 
    227 .mobile #login #nav,
    228 .mobile #login #backtoblog {
    229     margin-left: 8px;
    230 }
    231 
    232219body.interim-login {
    233220    height: auto;
     
    254241@-ms-viewport {
    255242    width: device-width;
     243}
     244
     245@media screen and ( max-height: 550px ) {
     246    #login {
     247        padding: 20px 0;
     248    }
    256249}
    257250
  • trunk/src/wp-login.php

    r38477 r38739  
    3737    add_action( 'login_head', 'wp_no_robots' );
    3838
    39     if ( wp_is_mobile() )
    40         add_action( 'login_head', 'wp_login_viewport_meta' );
     39    add_action( 'login_head', 'wp_login_viewport_meta' );
    4140
    4241    if ( empty($wp_error) )
     
    125124
    126125    $classes = array( 'login-action-' . $action, 'wp-core-ui' );
    127     if ( wp_is_mobile() )
    128         $classes[] = 'mobile';
    129126    if ( is_rtl() )
    130127        $classes[] = 'rtl';
     
    261258 */
    262259function wp_shake_js() {
    263     if ( wp_is_mobile() )
    264         return;
    265260?>
    266261<script type="text/javascript">
Note: See TracChangeset for help on using the changeset viewer.