function gmap_keys_service in GMap Module 6
Same name and namespace in other branches
- 5 gmap.module \gmap_keys_service()
- 6.2 gmap.module \gmap_keys_service()
- 7.2 gmap.module \gmap_keys_service()
- 7 gmap.module \gmap_keys_service()
Implementation of hook_keys_service(). (from the keys api)
File
- ./
gmap.module, line 1210 - GMap -- Routines to use the Google Maps API in Drupal.
Code
function gmap_keys_service() {
// @@@ Remove after everyone has upgraded.
if (module_exists('keys_api')) {
return array(
'gmap' => array(
'name' => t('Gmap'),
'description' => t('Google Maps API Key'),
),
);
}
elseif (module_exists('keys')) {
// @greenSkin:
// What is your reasoning behind predefining this?
// I'll avoid overriding you for now, but this seems rather arbitrary.
// Reference: http://drupal.org/cvs?commit=310498
// Probe keys to determine if it is defining our key for us.
$test = array();
if (function_exists('keys_keys_service')) {
$test = keys_keys_service();
}
if (!isset($test['google_maps'])) {
// Be forward compatible with future versions of keys api
// that no longer define it.
return array(
'google_maps' => array(
'name' => t('Google Maps'),
'description' => t('Google Maps API Key'),
),
);
}
}
}