WordPress.org

Make WordPress Core

Ticket #14537: 14537.4.patch

File 14537.4.patch, 1.3 KB (added by hakre, 8 years ago)

Filtered as in GCF lineup. Seperated Concerns.

  • wp-admin/admin.php

     
    5858
    5959require_once(ABSPATH . 'wp-admin/includes/admin.php');
    6060
     61// Google Chrome Frame Support
     62if ( $is_chromeframe && apply_filters( 'use_google_chrome_frame', true ) )
     63                header('X-UA-Compatible: chrome=1');
     64
    6165auth_redirect();
    6266
    6367nocache_headers();
  • wp-includes/vars.php

     
    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;