You are here

function popup_init in Popup 7

Same name and namespace in other branches
  1. 7.x popup.module \popup_init()
  2. 6.x popup.module \popup_init()

Implementation of hook_init

Adds popup Script, settings and Style

File

./popup.module, line 11

Code

function popup_init() {
  $path = drupal_get_path('module', 'popup');
  drupal_add_js($path . '/popup.js', array(
    'preprocess' => variable_get('popup-preprocess', FALSE),
  ));
  drupal_add_css($path . '/popup.css', array(
    'preprocess' => variable_get('popup-preprocess', FALSE),
  ));
  $effects = module_invoke_all('popup_effects');
  drupal_add_js(array(
    'popup' => array(
      'effects' => $effects,
      'linger' => variable_get('popup-hover-linger', 250),
      'delay' => variable_get('popup-hover-delay', 0),
    ),
  ), 'setting');
}