function geoip_add_js in GeoIP API 6
Helper function to add the GeoIP JavaScript.
File
- ./
geoip.module, line 76 - API for using the MaxMind GeoLite Country database.
Code
function geoip_add_js() {
static $geoip_json_included;
if (!$geoip_json_included) {
$geoip_json_included = TRUE;
$settings = array(
'lifetime' => 1,
);
drupal_add_js(array(
'geoip' => $settings,
), 'setting');
drupal_add_js(drupal_get_path('module', 'geoip') . '/geoip.js');
}
}