You are here

function heartbeat_init in Heartbeat 6.4

Same name and namespace in other branches
  1. 6.3 heartbeat.module \heartbeat_init()
  2. 7 heartbeat.module \heartbeat_init()

Implementation of hook_init().

File

./heartbeat.module, line 108

Code

function heartbeat_init() {
  global $user, $language;
  drupal_add_js(drupal_get_path('module', 'heartbeat') . '/heartbeat.js');
  drupal_add_js(array(
    'heartbeat_language' => $language->language,
  ), "setting");
  drupal_add_js(array(
    'heartbeat_poll_url' => url('heartbeat/js/poll', array(
      'absolute' => TRUE,
    )),
  ), "setting");
}