Last active
November 2, 2019 01:50
-
-
Save robdecker/11454224 to your computer and use it in GitHub Desktop.
[Preprocess html samples] From https://github.com/Krimson/wundertheme/blob/master/template.php #d7
This file contains hidden or 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
/** | |
* 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