WordPress.org

Make WordPress Core

Ticket #14537: 14537.3.patch

File 14537.3.patch, 1.3 KB (added by hakre, 4 years ago)

Google Chrome Support for Admin, introduces $is_chromeframe and deals with bug #14954

  • wp-includes/vars.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    3838$is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = 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; 
    43         } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false ) { 
     46        } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false && false === $is_chromeframe ) { 
    4447                $is_chrome = true; 
    4548        } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false ) { 
    4649                $is_safari = true; 
  • 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();