_color_page_alter

Definition

_color_page_alter(&$vars)
color/color.module, line 49

Description

Callback for the theme to alter the resources used.

Code

<?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;
  }
}
?>