You are here

function getlocations_init in Get Locations 7

Same name and namespace in other branches
  1. 6.2 getlocations.module \getlocations_init()
  2. 6 getlocations.module \getlocations_init()
  3. 7.2 getlocations.module \getlocations_init()

Implements hook_init().

File

./getlocations.module, line 32
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_init() {
  if (module_exists('colorbox')) {
    $getlocations_colorbox = getlocations_colorbox_settings();
    if ($getlocations_colorbox['enable']) {
      $settings = array(
        'getlocations_colorbox' => $getlocations_colorbox,
      );
      drupal_add_js($settings, 'setting');
      $getlocations_paths = getlocations_paths_get();
      drupal_add_js($getlocations_paths['getlocations_colorbox_path']);
    }
  }
}