function google_map_field_get_protocol in Google Map Field 7.2
Helper function to return current protocol.
2 calls to google_map_field_get_protocol()
- google_map_field_add_maps_api in ./
google_map_field.module - Helper function to add the Google Maps API.
- google_map_field_field_widget_form in ./
google_map_field.module - Implements hook_field_widget_form().
File
- ./
google_map_field.module, line 442 - This file defines all the necessary hooks and functions to create a Google Map Field field type for inserting maps directly into content items (node, entities etc).
Code
function google_map_field_get_protocol() {
return !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://";
}