WordPress.org

Make WordPress Core

Changeset 13555


Ignore:
Timestamp:
03/02/2010 06:48:31 PM (8 years ago)
Author:
nacin
Message:

Cleaner and ideally future-proof detection of mobile Safari browsers. see #12303

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/header.php

    r13554 r13555  
    2424    <link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" />
    2525
    26     <?php if( strstr( $_SERVER['HTTP_USER_AGENT'], 'iPhone' ) || strstr( $_SERVER['HTTP_USER_AGENT'], 'iPod' ) || strstr( $_SERVER['HTTP_USER_AGENT'], 'iPad' ) ) : ?>
     26    <?php if ( preg_match( '/Apple.*Mobile.*Safari/i', $_SERVER['HTTP_USER_AGENT'] ) ) : ?>
    2727        <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_directory'); ?>/mobile-webkit.css" />
    2828    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.