You are here

function heartbeat_init in Heartbeat 7

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

Implements hook_init().

File

./heartbeat.module, line 64
Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.

Code

function heartbeat_init() {
  drupal_add_js(array(
    'heartbeat_language' => $GLOBALS['language']->language,
  ), "setting");

  // Define the valid uri so javascript knows what to call.
  drupal_add_js(array(
    'heartbeat_poll_url' => url('heartbeat/js/poll', array(
      'absolute' => TRUE,
    )),
  ), "setting");
}