You are here

function eu_cookie_compliance_init in EU Cookie Compliance (GDPR Compliance) 6

Same name and namespace in other branches
  1. 5 eu_cookie_compliance.module \eu_cookie_compliance_init()

Implements hook_init().

File

./eu_cookie_compliance.module, line 29
This module intends to deal with the EU Directive on Privacy and Electronic Communications that comes into effect in the UK on 26th May 2012.

Code

function eu_cookie_compliance_init() {
  $enabled = eu_cookie_compliance_get_settings('popup_enabled');
  if ($enabled && user_access('see EU Cookie Compliance popup')) {
    $path = drupal_get_path('module', 'eu_cookie_compliance');
    drupal_add_css($path . '/css/eu_cookie_compliance.css');
    drupal_add_js($path . '/js/eu_cookie_compliance.js', 'module', 'footer');
  }
}