Simplify the login page viewport meta for mobile devices, so it's less restrictive on the user. Allows for developers to override if necessary via the login_head
action. props azaozz. fixes #24777.
git-svn-id: https://develop.svn.wordpress.org/trunk@25619 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d16e2bc2b1
commit
64b021bbce
@ -44,6 +44,9 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
|
||||
// Don't index any of these forms
|
||||
add_action( 'login_head', 'wp_no_robots' );
|
||||
|
||||
if ( wp_is_mobile() )
|
||||
add_action( 'login_head', 'wp_login_viewport_meta' );
|
||||
|
||||
if ( empty($wp_error) )
|
||||
$wp_error = new WP_Error();
|
||||
|
||||
@ -64,10 +67,6 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
|
||||
wp_admin_css( 'wp-admin', true );
|
||||
wp_admin_css( 'colors-fresh', true );
|
||||
|
||||
if ( wp_is_mobile() ) { ?>
|
||||
<meta name="viewport" content="width=320, initial-scale=0.9, maximum-scale=1.0, user-scalable=0" /><?php
|
||||
}
|
||||
|
||||
// Remove all stored post data on logging out.
|
||||
// This could be added by add_action('login_head'...) like wp_shake_js()
|
||||
// but maybe better if it's not removable by plugins
|
||||
@ -189,6 +188,12 @@ addLoadEvent(function(){ var p=new Array(15,30,15,0,-15,-30,-15,0);p=p.concat(p.
|
||||
<?php
|
||||
}
|
||||
|
||||
function wp_login_viewport_meta() {
|
||||
?>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles sending password retrieval email to user.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user