3
0
Fork 0
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:
Michael Stenta 2019-08-12 21:19:25 -04:00
parent ffcd2a888a
commit 8ecff7de26

View file

@ -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().
*/