_color_page_alter

Versions
5 – 7
_color_page_alter(&$vars)

Callback for the theme to alter the resources used.

▾ 1 function calls _color_page_alter()

_phptemplate_variables in themes/garland/template.php
Override or insert PHPTemplate variables into the templates.

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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.