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 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
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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.