Skip to content

Instantly share code, notes, and snippets.

@robdecker
Last active November 2, 2019 01:50
Show Gist options
  • Save robdecker/11454224 to your computer and use it in GitHub Desktop.
Save robdecker/11454224 to your computer and use it in GitHub Desktop.
/**
* Override or insert variables into the html template.
*
* @param $variables
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rendered. This is usually "html", but can
* also be "maintenance_page" since zen_preprocess_maintenance_page() calls
* this function to have consistent variables.
*/
function MY_THEME_preprocess_html(&$variables, $hook) {
$theme_path = drupal_get_path('theme', 'wundertheme');
drupal_add_css( $theme_path . '/stylesheets/ie.css',
array(
'group' => CSS_THEME,
'browsers' => array(
'IE' => 'lt IE 9',
'!IE' => FALSE,
),
'weight' => 999,
'every_page' => TRUE,
'media' => 'screen, projection'
)
);
drupal_add_css( $theme_path . '/stylesheets/style.css',
array(
'group' => CSS_THEME,
'browsers' => array(
'IE' => 'gt IE 8',
'!IE' => TRUE,
),
'weight' => 999,
'every_page' => TRUE,
'media' => 'screen, projection'
)
);
drupal_add_css( $theme_path . '/stylesheets/print.css',
array(
'group' => CSS_THEME,
'weight' => 999,
'every_page' => TRUE,
'media' => 'print'
)
);
$variables['favicon'] = url($theme_path . '/favicon.ico');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment