function getdirections_init in Get Directions 7.2
Same name and namespace in other branches
- 6.2 getdirections.module \getdirections_init()
- 6 getdirections.module \getdirections_init()
- 7.3 getdirections.module \getdirections_init()
Implements hook_init().
File
- ./
getdirections.module, line 24 - Fetches google map directions.
Code
function getdirections_init() {
if (!module_load_include('inc', 'getdirections', 'getdirections.config')) {
define('GETDIRECTIONS_WAYPOINTS_MAX', 8);
}
module_load_include('inc', 'getdirections', 'getdirections.api');
if (module_exists('colorbox')) {
$getdirections_colorbox = variable_get('getdirections_colorbox', array(
'enable' => 0,
'width' => 600,
'height' => 600,
));
$settings = array(
'getdirections_colorbox' => $getdirections_colorbox,
);
drupal_add_js($settings, 'setting');
drupal_add_js(GETDIRECTIONS_PATH . '/getdirections.js');
}
}