mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Add the Google Maps API key to /farm.json.
This commit is contained in:
parent
ffcd2a888a
commit
8ecff7de26
|
@ -164,6 +164,21 @@ function farm_map_settings_form_submit($form, $form_state) {
|
|||
drupal_flush_all_caches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_farm_info().
|
||||
*/
|
||||
function farm_map_farm_info() {
|
||||
$info = array();
|
||||
|
||||
// Add the Google Maps API key to /farm.json.
|
||||
$google_maps_api_key = variable_get('farm_map_google_api_key', '');
|
||||
if (!empty($google_maps_api_key)) {
|
||||
$info['google_maps_api_key'] = $google_maps_api_key;
|
||||
}
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_openlayers_object_preprocess_alter().
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue