You are here

function cookie_content_blocker_page_alter in Cookie Content Blocker 7

Implements hook_page_alter().

File

./cookie_content_blocker.module, line 79
Contains the main module code for Cookie content blocker.

Code

function cookie_content_blocker_page_alter(&$page) {
  $consent_awareness_settings = variable_get('cookie_content_blocker_consent_awareness', _cookie_consent_blocker_consent_awareness_defaults());
  if (empty($consent_awareness_settings)) {
    return;
  }
  drupal_add_library('system', 'jquery.cookie');
  drupal_add_js(array(
    'cookieContentBlocker' => array(
      'consentAwareness' => $consent_awareness_settings,
    ),
  ), 'setting');
}