Created
September 10, 2014 14:05
-
-
Save mattmckenny/f516ed2a07b55bbde414 to your computer and use it in GitHub Desktop.
IE force edge in WordPress
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 | |
// Forces edge in IE browsers | |
add_filter('wp_headers', 'bf_ie_add_header'); | |
function bf_ie_add_header($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