You are here

function eu_cookie_compliance_json in EU Cookie Compliance (GDPR Compliance) 7

Same name and namespace in other branches
  1. 7.2 eu_cookie_compliance.module \eu_cookie_compliance_json()

Menu callback for return JSON EU visitor status.

1 string reference to 'eu_cookie_compliance_json'
eu_cookie_compliance_menu in ./eu_cookie_compliance.module
Implements hook_menu().

File

./eu_cookie_compliance.module, line 660
EU cookie compliance primary module file.

Code

function eu_cookie_compliance_json() {
  $data = eu_cookie_compliance_user_in_eu();

  // Allow other modules to alter the geo IP matching logic.
  drupal_alter('eu_cookie_compliance_geoip_match', $data);
  drupal_add_http_header('Cache-Control', 'private');
  drupal_json_output($data);
  drupal_exit();
}