WordPress.org

Make WordPress Core

Ticket #14537: 14537.2.patch

File 14537.2.patch, 1.2 KB (added by hakre, 5 years ago)

Introducing $is_chromeframe

  • wp-admin/admin.php

     
    5858 
    5959require_once(ABSPATH . 'wp-admin/includes/admin.php'); 
    6060 
     61// Google Chrome Frame Support 
     62if ( $is_chromeframe ) 
     63                header('X-UA-Compatible: chrome=1'); 
     64 
    6165auth_redirect(); 
    6266 
    6367nocache_headers(); 
  • 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_chromeframe = false; 
    3939 
    4040if ( isset($_SERVER['HTTP_USER_AGENT']) ) { 
     41        if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'chromeframe' ) ) { 
     42                $is_chromeframe = true; 
     43        } 
    4144        if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false ) { 
    4245                $is_lynx = true; 
    4346        } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false ) {