Skip to content

Instantly share code, notes, and snippets.

@ChrisCree
Last active October 19, 2017 20:26
Show Gist options
  • Save ChrisCree/7258761 to your computer and use it in GitHub Desktop.
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.
<?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