_color_page_alter
- Versions
- 5 – 6
_color_page_alter(&$vars)
Callback for the theme to alter the resources used.
Code
modules/color/color.module, line 55
<?php
function _color_page_alter(&$vars) {
global $theme_key;
// Override stylesheet
$path = variable_get('color_'. $theme_key .'_stylesheet', NULL);
if ($path) {
$vars['css']['all']['theme'][$path] = TRUE;
$vars['styles'] = drupal_get_css($vars['css']);
}
// Override logo
$logo = variable_get('color_'. $theme_key .'_logo', NULL);
if ($logo && $vars['logo'] && preg_match('!'. $theme_key .'/logo.png$!', $vars['logo'])) {
$vars['logo'] = base_path() . $logo;
}
}
?>Login or register to post comments 