Same name and namespace in other branches
  1. 5.x modules/color/color.module \_color_page_alter()
  2. 6.x modules/color/color.module \_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 themes/bartik/template.php
Override or insert variables into the page template.
garland_process_page in themes/garland/template.php
Override or insert variables into the page template.

File

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