WordPress.org

Make WordPress Core

Ticket #24777: 24777.3.patch

File 24777.3.patch, 1.0 KB (added by azaozz, 7 months ago)
  • wp-login.php

     
    4444        // Don't index any of these forms 
    4545        add_action( 'login_head', 'wp_no_robots' ); 
    4646 
     47        if ( wp_is_mobile() ) 
     48                add_action( 'login_head', 'login_viewport_meta' ); 
     49 
    4750        if ( empty($wp_error) ) 
    4851                $wp_error = new WP_Error(); 
    4952 
     
    6467        wp_admin_css( 'wp-admin', true ); 
    6568        wp_admin_css( 'colors-fresh', true ); 
    6669 
    67         if ( wp_is_mobile() ) { ?> 
    68                 <meta name="viewport" content="width=320, initial-scale=0.9, maximum-scale=1.0, user-scalable=0" /><?php 
    69         } 
    70  
    7170        // Remove all stored post data on logging out. 
    7271        // This could be added by add_action('login_head'...) like wp_shake_js() 
    7372        // but maybe better if it's not removable by plugins 
     
    189188<?php 
    190189} 
    191190 
     191function login_viewport_meta() { 
     192        ?> 
     193        <meta name="viewport" content="width=device-width" /> 
     194        <?php 
     195} 
     196 
    192197/** 
    193198 * Handles sending password retrieval email to user. 
    194199 *