You are here

function christmas_lights_page_build in Christmas Lights 7

Implements hook_page_build().

File

./christmas_lights.module, line 99
Main file for the christmas_lights module.

Code

function christmas_lights_page_build(&$page) {
  $settings = variable_get('christmas_lights_settings');
  if ($settings['enabled']) {
    if (REQUEST_TIME >= $settings['start'] && REQUEST_TIME <= $settings['end']) {
      drupal_add_css(drupal_get_path('module', 'christmas_lights') . '/css/christmas_lights.css');
      drupal_add_js(drupal_get_path('module', 'christmas_lights') . '/js/christmas_lights.js', array(
        'scope' => 'footer',
      ));
      $page['page_bottom']['christmas_lights']['#markup'] = '<div id="christmas-lights"></div>';
    }
  }
}