You are here

function device_geolocation_check_geolocation_attempt_ajax in Smart IP 6

Same name and namespace in other branches
  1. 6.2 modules/device_geolocation/device_geolocation.module \device_geolocation_check_geolocation_attempt_ajax()
  2. 7.2 modules/device_geolocation/device_geolocation.module \device_geolocation_check_geolocation_attempt_ajax()
  3. 7 modules/device_geolocation/device_geolocation.module \device_geolocation_check_geolocation_attempt_ajax()

Check Geolocation attempt ajax callback.

1 string reference to 'device_geolocation_check_geolocation_attempt_ajax'
device_geolocation_menu in modules/device_geolocation/device_geolocation.module
Implements hook_menu().

File

modules/device_geolocation/device_geolocation.module, line 300
Provides visitor's geographical location using client device location source that implements W3C Geolocation API and Google Geocoding service.

Code

function device_geolocation_check_geolocation_attempt_ajax() {
  if (device_geolocation_check_geolocation_attempt()) {
    drupal_json(array(
      'ask_geolocate' => TRUE,
    ));
    return;
  }
  drupal_json(array(
    'ask_geolocate' => FALSE,
  ));
}