You are here

function site_alert_block_view in Site Alert 7

Implements hook_block_view().

File

./site_alert.module, line 217
Core functionality for the Site Alert module.

Code

function site_alert_block_view() {
  drupal_add_js(drupal_get_path('module', 'site_alert') . '/site_alert.js');
  drupal_add_js(array(
    'siteAlert' => array(
      'timeout' => variable_get('site_alert_timeout', SITE_ALERT_TIMEOUT_DEFAULT),
    ),
  ), 'setting');
  $block = array(
    'content' => array(
      '#theme' => 'site_alert_wrapper',
    ),
  );
  return $block;
}