mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-22 22:34:30 +00:00
Introduce wp_is_mobile() and use it instead of $is_iphone global, see #20014
git-svn-id: https://develop.svn.wordpress.org/trunk@20417 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -583,9 +583,10 @@ foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
|
||||
}
|
||||
|
||||
function _ipad_meta() {
|
||||
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') !== false ) { ?>
|
||||
<meta name="viewport" id="ipad-viewportmeta" content="width=device-width, initial-scale=1">
|
||||
<?php
|
||||
if ( wp_is_mobile() ) {
|
||||
?>
|
||||
<meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=1">
|
||||
<?php
|
||||
}
|
||||
}
|
||||
add_action('admin_head', '_ipad_meta');
|
||||
|
||||
Reference in New Issue
Block a user