function _color_page_alter

Replaces the logo with a color-altered logo.

A theme that supports the color module should call this function from its THEME_process_page() function, so that the correct logo is included when page.tpl.php is rendered.

See also

theme()

2 calls to _color_page_alter()
bartik_process_page in drupal/themes/bartik/template.php
Override or insert variables into the page template.
garland_process_page in drupal/themes/garland/template.php
Override or insert variables into the page template.

File

drupal/modules/color/color.module, line 120
Allows users to change the color scheme of themes.

Code

function _color_page_alter(&$vars) {
  global $theme_key;

  // Override logo.
  $logo = variable_get('color_' . $theme_key . '_logo');
  if ($logo && $vars['logo'] && preg_match('!' . $theme_key . '/logo.png$!', $vars['logo'])) {
    $vars['logo'] = file_create_url($logo);
  }
}