function ip_geoloc_library_info_alter in IP Geolocation Views & Maps 8
Function ip_geoloc_library_alter(&$libraries, $module) {.
File
- ./
ip_geoloc.module, line 150 - IPGV&M is a mapping engine for Views that contain locations of entities and/or visitors. Google Maps, Leaflet and OpenLayers2 maps are all supported and available through this module. Using a number of optional sources IPGV&M also retrieves…
Code
function ip_geoloc_library_info_alter(&$libraries, $extension) {
if (isset($libraries['current_location_js']['js'])) {
$js_array = array_keys($libraries['current_location_js']['js']);
$library_config = $libraries['current_location_js']['js'][$js_array[0]];
unset($libraries['current_location_js']['js'][$js_array[0]]);
$google_with_key[IP_GEOLOC_GOOGLE_MAPS] = $library_config;
$libraries['current_location_js']['js'] = $google_with_key + $libraries['current_location_js']['js'];
}
if (isset($libraries['multi_location_js_style_map']['js'])) {
$js_array = array_keys($libraries['multi_location_js_style_map']['js']);
$library_config = $libraries['multi_location_js_style_map']['js'][$js_array[0]];
unset($libraries['multi_location_js_style_map']['js'][$js_array[0]]);
$google_with_key[IP_GEOLOC_GOOGLE_MAPS] = $library_config;
$libraries['multi_location_js_style_map']['js'] = $google_with_key + $libraries['multi_location_js_style_map']['js'];
}
}