Community Documentation

_color_page_alter

5 color.module _color_page_alter(&$vars)
6 color.module _color_page_alter(&$vars)
7 color.module _color_page_alter(&$vars)
8 color.module _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.

File

modules/color/color.module, line 55

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;
  }
}
?>
Login or register to post comments