function _color_page_alter

_color_page_alter(&$vars)

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()

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!color!color.module/function/_color_page_alter/7.x