Ticket #14537: 14537.6.patch
| File 14537.6.patch, 1.2 KB (added by hakre, 3 years ago) |
|---|
-
wp-includes/vars.php
35 35 } 36 36 37 37 // 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_chromeframe = false; 39 39 40 40 if ( isset($_SERVER['HTTP_USER_AGENT']) ) { 41 $is_chromeframe = false !== strpos($_SERVER['HTTP_USER_AGENT'], 'chromeframe'); 41 42 if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false ) { 42 43 $is_lynx = true; 43 } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false ) {44 } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false && $is_chromeframe === false ) { 44 45 $is_chrome = true; 45 46 } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false ) { 46 47 $is_safari = true; … … 62 63 63 64 $is_IE = ( $is_macIE || $is_winIE ); 64 65 66 // Google Chrome Frame Support 67 if ( $is_chromeframe && apply_filters( 'use_google_chrome_frame', is_admin() ) ) 68 header('X-UA-Compatible: chrome=1'); 69 65 70 // Server detection 66 71 67 72 /**
