function site_banner_html_head_alter in Site Banner 7
Implements hook_html_head_alter().
File
- ./
site_banner.module, line 27 - Main module file implementing callbacks for the site banner module.
Code
function site_banner_html_head_alter(&$head_elements) {
// Enable the site banner only if the site banner is
// setup globally or enabled by a context.
$banner_active = variable_get('site_banner_status', FALSE);
$debug_mode = site_banner_check_if_debug_mode_active();
if (module_exists('context')) {
$plugin = context_get_plugin('reaction', 'change_banner_status');
if ($plugin) {
$plugin
->execute($banner_active, $debug_mode);
}
}
if ($banner_active) {
drupal_add_css(drupal_get_path('module', 'site_banner') . '/site_banner_screen.css', array(
'media' => 'screen',
));
drupal_add_css(drupal_get_path('module', 'site_banner') . '/site_banner_print.css', array(
'media' => 'print',
));
}
}