Implements hook_preprocess_html().
Add in rendering IE meta tag if "combine CSS" is enabled.
Fichier
-
./
advagg.module, line 1223
Code
function advagg_preprocess_html() {
// http://www.phpied.com/conditional-comments-block-downloads/#update
// Prevent conditional comments from stalling css downloads.
$fix_blocking_css_ie = array(
'#weight' => '-999999',
'#type' => 'markup',
'#markup' => "<!--[if IE]><![endif]-->\n",
);
// Add markup for IE conditional comments to head.
drupal_add_html_head($fix_blocking_css_ie, 'fix_blocking_css_ie');
// Do not force IE rendering mode if "combine CSS" is disabled.
if (!variable_get('advagg_combine_css_media', ADVAGG_COMBINE_CSS_MEDIA)) {
return;
}
// Send IE meta tag to force IE rendering mode header.
$x_ua_compatible = 'IE=edge';
if (variable_get('advagg_chrome_header_enabled', ADVAGG_CHROME_HEADER_ENABLED)) {
$x_ua_compatible .= ',chrome=1';
}
drupal_add_http_header('X-UA-Compatible', $x_ua_compatible);
}