WordPress.org

Make WordPress Core

Ticket #13347: 13347.patch

File 13347.patch, 1.3 KB (added by ocean90, 8 years ago)

Patch from attached vars.php

  • wp-includes/vars.php

     
    3535}
    3636
    3737// Simple browser detection
    38 $is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = false;
     38$is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = $is_pad = $is_android = $is_blackberry = false;
    3939
    4040if ( isset($_SERVER['HTTP_USER_AGENT']) ) {
    4141        if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false ) {
     
    5757        }
    5858}
    5959
    60 if ( $is_safari && stripos($_SERVER['HTTP_USER_AGENT'], 'mobile') !== false )
     60if ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'iphone') !== false )
    6161        $is_iphone = true;
    62 
     62if ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'ipad') !== false )
     63        $is_ipad = true;
     64if ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'android') !== false )
     65        $is_android = true;
     66if ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'blackberry') !== false )
     67        $is_blackberry = true;
     68       
    6369$is_IE = ( $is_macIE || $is_winIE );
    6470
    6571// Server detection
     
    8389$is_iis7 = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false);
    8490
    8591
    86 ?>
    87  No newline at end of file
     92?>