You are here

function it_cookie_compliance_page_alter in IT Cookie Compliance 7

Implements hook_page_alter().

Alter the pages to remove specified blocks and JSs when cookies have not been accepted.

File

./it_cookie_compliance.module, line 84
IT Cookie Compliance module main file.

Code

function it_cookie_compliance_page_alter(&$page) {
  if (it_cookie_compliance_are_cookie_not_accepted()) {
    it_cookie_compliance_exclude_js_from_page($page);
    it_cookie_compliance_exclude_blocks_from_page($page);
  }
}