Last active
October 19, 2017 20:26
-
-
Save ChrisCree/7258761 to your computer and use it in GitHub Desktop.
Force IE not to use so-called "compatibility" mode in the Genesis theme framework.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do not copy opening php tag | |
// Force Stupid IE to NOT use compatibility mode | |
add_filter( 'wp_headers', 'wsm_keep_ie_modern' ); | |
function wsm_keep_ie_modern( $headers ) { | |
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) ) { | |
$headers['X-UA-Compatible'] = 'IE=edge,chrome=1'; | |
} | |
return $headers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment