<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[20417] trunk: Introduce wp_is_mobile() and use it instead of $is_iphone global, see #20014</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/20417">20417</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2012-04-10 01:19:30 +0000 (Tue, 10 Apr 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Introduce wp_is_mobile() and use it instead of $is_iphone global, see <a href="http://core.trac.wordpress.org/ticket/20014">#20014</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminheaderphp">trunk/wp-admin/admin-header.php</a></li>
<li><a href="#trunkwpadmincsswpadmindevcss">trunk/wp-admin/css/wp-admin.dev.css</a></li>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminincludesmiscphp">trunk/wp-admin/includes/misc.php</a></li>
<li><a href="#trunkwpadminjspostboxdevjs">trunk/wp-admin/js/postbox.dev.js</a></li>
<li><a href="#trunkwpadminmedianewphp">trunk/wp-admin/media-new.php</a></li>
<li><a href="#trunkwpadminmenuphp">trunk/wp-admin/menu.php</a></li>
<li><a href="#trunkwpincludesclasswpadminbarphp">trunk/wp-includes/class-wp-admin-bar.php</a></li>
<li><a href="#trunkwpincludesgeneraltemplatephp">trunk/wp-includes/general-template.php</a></li>
<li><a href="#trunkwpincludesvarsphp">trunk/wp-includes/vars.php</a></li>
<li><a href="#trunkwploginphp">trunk/wp-login.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-header.php (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-header.php        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-admin/admin-header.php        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">         require_once( './admin.php' );
</span><span class="cx">
</span><span class="cx"> // In case admin-header.php is included in a function.
</span><del>-global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone,
</del><ins>+global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version,
</ins><span class="cx">         $current_site, $update_title, $total_update_count, $parent_file;
</span><span class="cx">
</span><span class="cx"> // Catch plugins that include admin-header.php before admin.php completes.
</span><span class="lines">@@ -87,9 +87,10 @@
</span><span class="cx"> $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
</span><span class="cx"> $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
</span><span class="cx">
</span><del>-if ( $is_iphone ) { ?>
-<style type="text/css">.row-actions{visibility:visible;}</style>
-<?php } ?>
</del><ins>+if ( wp_is_mobile() )
+        $admin_body_class .= ' mobile';
+
+?>
</ins><span class="cx"> </head>
</span><span class="cx"> <body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
</span><span class="cx"> <script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script>
</span></span></pre></div>
<a id="trunkwpadmincsswpadmindevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin.dev.css (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin.dev.css        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-admin/css/wp-admin.dev.css        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -5323,6 +5323,10 @@
</span><span class="cx">         padding: 2px 0 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.mobile .row-actions {
+        visibility: visible;
+}
+
</ins><span class="cx"> tr:hover .row-actions,
</span><span class="cx"> div.comment-item:hover .row-actions {
</span><span class="cx">         visibility: visible;
</span></span></pre></div>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-admin/includes/media.php        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -62,10 +62,10 @@
</span><span class="cx"> * @since 2.5.0
</span><span class="cx"> */
</span><span class="cx"> function the_media_upload_tabs() {
</span><del>-        global $redir_tab, $is_iphone;
</del><ins>+        global $redir_tab;
</ins><span class="cx">         $tabs = media_upload_tabs();
</span><span class="cx">
</span><del>-        if ( $is_iphone ) {
</del><ins>+        if ( wp_is_mobile() ) {
</ins><span class="cx">                 unset($tabs['type']);
</span><span class="cx">                 $default = 'type_url';
</span><span class="cx">         } else {
</span><span class="lines">@@ -528,8 +528,6 @@
</span><span class="cx"> * @return unknown
</span><span class="cx"> */
</span><span class="cx"> function wp_media_upload_handler() {
</span><del>-        global $is_iphone;
-
</del><span class="cx">         $errors = array();
</span><span class="cx">         $id = 0;
</span><span class="cx">
</span><span class="lines">@@ -600,7 +598,7 @@
</span><span class="cx">                 return wp_iframe( 'media_upload_type_url_form', $type, $errors, $id );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        if ( $is_iphone )
</del><ins>+        if ( wp_is_mobile() )
</ins><span class="cx">                 return wp_iframe( 'media_upload_type_url_form', 'image', $errors, $id );
</span><span class="cx">         else
</span><span class="cx">                 return wp_iframe( 'media_upload_type_form', 'image', $errors, $id );
</span><span class="lines">@@ -1306,9 +1304,9 @@
</span><span class="cx"> * @param unknown_type $errors
</span><span class="cx"> */
</span><span class="cx"> function media_upload_form( $errors = null ) {
</span><del>-        global $type, $tab, $pagenow, $is_IE, $is_opera, $is_iphone;
</del><ins>+        global $type, $tab, $pagenow, $is_IE, $is_opera;
</ins><span class="cx">
</span><del>-        if ( $is_iphone )
</del><ins>+        if ( wp_is_mobile() )
</ins><span class="cx">                 return;
</span><span class="cx">
</span><span class="cx">         $upload_action_url = admin_url('async-upload.php');
</span><span class="lines">@@ -1440,9 +1438,7 @@
</span><span class="cx"> * @param unknown_type $id
</span><span class="cx"> */
</span><span class="cx"> function media_upload_type_form($type = 'file', $errors = null, $id = null) {
</span><del>-        global $is_iphone;
-
-        if ( $is_iphone )
</del><ins>+        if ( wp_is_mobile() )
</ins><span class="cx">                 return;
</span><span class="cx">
</span><span class="cx">         media_upload_header();
</span></span></pre></div>
<a id="trunkwpadminincludesmiscphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/misc.php (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/misc.php        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-admin/includes/misc.php        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -583,9 +583,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function _ipad_meta() {
</span><del>-        if ( strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') !== false ) { ?>
-                <meta name="viewport" id="ipad-viewportmeta" content="width=device-width, initial-scale=1">
-        <?php
</del><ins>+        if ( wp_is_mobile() ) {
+                ?>
+                <meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=1">
+                <?php
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> add_action('admin_head', '_ipad_meta');
</span></span></pre></div>
<a id="trunkwpadminjspostboxdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/postbox.dev.js (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/postbox.dev.js        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-admin/js/postbox.dev.js        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-var postboxes, is_iPad = navigator.userAgent.match(/iPad/);
</del><ins>+var postboxes;
</ins><span class="cx">
</span><span class="cx"> (function($) {
</span><span class="cx">         postboxes = {
</span></span></pre></div>
<a id="trunkwpadminmedianewphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/media-new.php (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/media-new.php        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-admin/media-new.php        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -6,9 +6,7 @@
</span><span class="cx"> * @subpackage Administration
</span><span class="cx"> */
</span><span class="cx">
</span><del>-global $is_iphone;
-
-if ( $is_iphone ) // cannot upload files from iPhone/iPad
</del><ins>+if ( wp_is_mobile() ) // cannot upload files from mobile devices
</ins><span class="cx">         return;
</span><span class="cx">
</span><span class="cx"> $_GET['inline'] = 'true';
</span></span></pre></div>
<a id="trunkwpadminmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu.php (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu.php        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-admin/menu.php        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> $menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'div' );
</span><span class="cx">         $submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php');
</span><span class="cx">         /* translators: add new file */
</span><del>-        if ( !$is_iphone )
</del><ins>+        if ( ! wp_is_mobile() )
</ins><span class="cx">                 $submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php');
</span><span class="cx">
</span><span class="cx"> $menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'div' );
</span></span></pre></div>
<a id="trunkwpincludesclasswpadminbarphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-admin-bar.php (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-admin-bar.php        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-includes/class-wp-admin-bar.php        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -321,7 +321,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         final protected function _render( $root ) {
</span><del>-                global $is_IE, $is_iphone;
</del><ins>+                global $is_IE;
</ins><span class="cx">
</span><span class="cx">                 // Add browser classes.
</span><span class="cx">                 // We have to do this here since admin bar shows on the front end.
</span><span class="lines">@@ -333,7 +333,7 @@
</span><span class="cx">                                 $class .= ' ie8';
</span><span class="cx">                         elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) )
</span><span class="cx">                                 $class .= ' ie9';
</span><del>-                } elseif ( $is_iphone ) {
</del><ins>+                } elseif ( wp_is_mobile() ) {
</ins><span class="cx">                         $class .= ' mobile';
</span><span class="cx">                 }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/general-template.php (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/general-template.php        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-includes/general-template.php        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -1746,14 +1746,14 @@
</span><span class="cx"> * @return bool
</span><span class="cx"> */
</span><span class="cx"> function user_can_richedit() {
</span><del>-        global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_iphone, $is_IE;
</del><ins>+        global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE;
</ins><span class="cx">
</span><span class="cx">         if ( !isset($wp_rich_edit) ) {
</span><span class="cx">                 $wp_rich_edit = false;
</span><span class="cx">
</span><span class="cx">                 if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users
</span><span class="cx">                         if ( $is_safari ) {
</span><del>-                                if ( $is_iphone || false !== strpos( $_SERVER['HTTP_USER_AGENT'], '; Silk/' ) )
</del><ins>+                                if ( wp_is_mobile() || false !== strpos( $_SERVER['HTTP_USER_AGENT'], '; Silk/' ) )
</ins><span class="cx">                                         $wp_rich_edit = ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
</span><span class="cx">                                 else
</span><span class="cx">                                         $wp_rich_edit = true;
</span></span></pre></div>
<a id="trunkwpincludesvarsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/vars.php (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/vars.php        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-includes/vars.php        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -97,3 +97,28 @@
</span><span class="cx"> * @global bool $is_iis7
</span><span class="cx"> */
</span><span class="cx"> $is_iis7 = $is_IIS && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false);
</span><ins>+
+/**
+ * Test if the current browser runs on a mobile device (smart phone, tablet, etc.)
+ *
+ * @return bool true|false
+ */
+function wp_is_mobile() {
+        static $is_mobile;
+
+        if ( isset($is_mobile) )
+                return $is_mobile;
+
+        if ( empty($_SERVER['HTTP_USER_AGENT']) ) {
+                $is_mobile = false;
+        } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false // many mobile devices (all iPhone, iPad, etc.)
+                || strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false
+                || strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false
+                || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) {
+                        $is_mobile = true;
+        } else {
+                $is_mobile = false;
+        }
+
+        return $is_mobile;
+}
</ins></span></pre></div>
<a id="trunkwploginphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-login.php (20416 => 20417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-login.php        2012-04-10 00:58:23 UTC (rev 20416)
+++ trunk/wp-login.php        2012-04-10 01:19:30 UTC (rev 20417)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> * @param WP_Error $wp_error Optional. WordPress Error Object
</span><span class="cx"> */
</span><span class="cx"> function login_header($title = 'Log In', $message = '', $wp_error = '') {
</span><del>-        global $error, $is_iphone, $interim_login, $current_site;
</del><ins>+        global $error, $interim_login, $current_site;
</ins><span class="cx">
</span><span class="cx">         // Don't index any of these forms
</span><span class="cx">         add_action( 'login_head', 'wp_no_robots' );
</span><span class="lines">@@ -54,25 +54,26 @@
</span><span class="cx">         if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) )
</span><span class="cx">                 add_action( 'login_head', 'wp_shake_js', 12 );
</span><span class="cx">
</span><del>-        ?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
-<head>
</del><ins>+        ?><!DOCTYPE html>
+        <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
+        <head>
</ins><span class="cx">         <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
</span><span class="cx">         <title><?php bloginfo('name'); ?> &rsaquo; <?php echo $title; ?></title>
</span><del>-<?php
</del><ins>+        <?php
+
</ins><span class="cx">         wp_admin_css( 'wp-admin', true );
</span><span class="cx">         wp_admin_css( 'colors-fresh', true );
</span><span class="cx">
</span><del>-        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">
-        .login form, .login .message, #login_error { margin-left: 0px; }
-        .login #nav, .login #backtoblog { margin-left: 8px; }
-        .login h1 a { width: auto; }
-        #login { padding: 20px 0; }
-        </style>
-<?php
</del><ins>+        if ( wp_is_mobile() ) {
+                ?>
+                <meta name="viewport" content="width=320; initial-scale=0.9; maximum-scale=1.0; user-scalable=0;" />
+                <style type="text/css" media="screen">
+                .login form, .login .message, #login_error { margin-left: 0px; }
+                .login #nav, .login #backtoblog { margin-left: 8px; }
+                .login h1 a { width: auto; }
+                #login { padding: 20px 0; }
+                </style>
+                <?php
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         do_action( 'login_enqueue_scripts' );
</span><span class="lines">@@ -88,16 +89,19 @@
</span><span class="cx">
</span><span class="cx">         $login_header_url = apply_filters( 'login_headerurl', $login_header_url );
</span><span class="cx">         $login_header_title = apply_filters( 'login_headertitle', $login_header_title );
</span><del>-?>
-</head>
-<body class="login">
</del><ins>+
+        ?>
+        </head>
+        <body class="login">
</ins><span class="cx">         <div id="login">
</span><span class="cx">                 <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
</span><del>-<?php
</del><ins>+        <?php
+
</ins><span class="cx">         unset( $login_header_url, $login_header_title );
</span><span class="cx">
</span><span class="cx">         $message = apply_filters('login_message', $message);
</span><del>-        if ( !empty( $message ) ) echo $message . "\n";
</del><ins>+        if ( !empty( $message ) )
+                echo $message . "\n";
</ins><span class="cx">
</span><span class="cx">         // In case a plugin uses $error rather than the $wp_errors object
</span><span class="cx">         if ( !empty( $error ) ) {
</span><span class="lines">@@ -134,23 +138,22 @@
</span><span class="cx">         <p id="backtoblog"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php esc_attr_e( 'Are you lost?' ); ?>"><?php printf( __( '&larr; Back to %s' ), get_bloginfo( 'title', 'display' ) ); ?></a></p>
</span><span class="cx">         </div>
</span><span class="cx">
</span><del>-<?php if ( !empty($input_id) ) : ?>
-<script type="text/javascript">
-try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
-if(typeof wpOnload=='function')wpOnload();
-</script>
-<?php endif; ?>
</del><ins>+        <?php if ( !empty($input_id) ) : ?>
+        <script type="text/javascript">
+        try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
+        if(typeof wpOnload=='function')wpOnload();
+        </script>
+        <?php endif; ?>
</ins><span class="cx">
</span><del>-<?php do_action('login_footer'); ?>
-<div class="clear"></div>
-</body>
-</html>
-<?php
</del><ins>+        <?php do_action('login_footer'); ?>
+        <div class="clear"></div>
+        </body>
+        </html>
+        <?php
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function wp_shake_js() {
</span><del>-        global $is_iphone;
-        if ( $is_iphone )
</del><ins>+        if ( wp_is_mobile() )
</ins><span class="cx">                 return;
</span><span class="cx"> ?>
</span><span class="cx"> <script type="text/javascript">
</span></span></pre>
</div>
</div>
</body>
</html>