Skip to content

Instantly share code, notes, and snippets.

@mglaman
Created April 15, 2014 04:45
Show Gist options
  • Save mglaman/10702865 to your computer and use it in GitHub Desktop.
Save mglaman/10702865 to your computer and use it in GitHub Desktop.
<?php
/**
* Implements hook_preprocess_html().
*/
function mytheme_preprocess_html(&$variables) {
// IE EDGE SUPPORT
if (drupal_get_http_header('X-UA-Compatible') === NULL) {
drupal_add_http_header('X-UA-Compatible', 'IE=edge,chrome=1');
}
$meta_ie_edge= array(
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => array(
'http-equiv' => 'X-UA-Compatible',
'content' => 'IE=edge,chrome=1',
),
'#weight' => -99999,
);
// Add header meta tag for IE to head
drupal_add_html_head($meta_ie_edge, 'meta_ie_edge');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment