Give login screen proper iPhone viewport, props noel, fixes #10023

git-svn-id: http://svn.automattic.com/wordpress/trunk@11514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-06-03 22:15:22 +00:00
parent 709eaa542b
commit 0b1ce740ed
1 changed files with 13 additions and 2 deletions

View File

@ -39,7 +39,7 @@ if ( force_ssl_admin() && !is_ssl() ) {
* @param WP_Error $wp_error Optional. WordPress Error Object
*/
function login_header($title = 'Log In', $message = '', $wp_error = '') {
global $error;
global $error, $is_iphone;
// Don't index any of these forms
add_filter( 'pre_option_blog_public', create_function( '$a', 'return 0;' ) );
@ -56,6 +56,17 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
<?php
wp_admin_css( 'login', true );
wp_admin_css( 'colors-fresh', true );
if ( $is_iphone ) {
?>
<meta name="viewport" content="width=320; initial-scale=0.9; maximum-scale=1.0; user-scalable=0;" />
<style type="text/css" media="screen">
form { margin-left: 0px; }
#login { margin-top: 20px; }
</style>
<?php
}
do_action('login_head'); ?>
</head>
<body class="login">