WordPress.org

Make WordPress Core

Ticket #15319: browser.patch

File browser.patch, 1.2 KB (added by pross, 8 years ago)
  • wp-includes/vars.php

     
    5252                $is_safari = true;
    5353        } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false ) {
    5454                $is_gecko = true;
    55         } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Win') !== false ) {
    56                 $is_winIE = true;
    57         } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false ) {
    58                 $is_macIE = true;
     55        } elseif ( ( $msie = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) && strpos($_SERVER['HTTP_USER_AGENT'], 'Win') !== false ) {
     56                $is_winIE = substr($_SERVER['HTTP_USER_AGENT'], $msie + 5, 3);
     57        } elseif ( ( $msie = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false ) {
     58                $is_macIE = substr($_SERVER['HTTP_USER_AGENT'], $msie + 5, 3);
    5959        } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false ) {
    6060                $is_opera = true;
    6161        } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Nav') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla/4.') !== false ) {