You are here

function hook_eu_cookie_compliance_show_popup_alter in EU Cookie Compliance (GDPR Compliance) 2.0.x

Same name and namespace in other branches
  1. 8 eu_cookie_compliance.api.php \hook_eu_cookie_compliance_show_popup_alter()
  2. 7.2 eu_cookie_compliance.api.php \hook_eu_cookie_compliance_show_popup_alter()
  3. 7 eu_cookie_compliance.api.php \hook_eu_cookie_compliance_show_popup_alter()

Alter hook to provide advanced logic for hiding the banner.

Parameters

bool $show_popup: Whether to show the banner.

File

./eu_cookie_compliance.api.php, line 47
Hooks specific to the EU Cookie Compliance module.

Code

function hook_eu_cookie_compliance_show_popup_alter(&$show_popup) {
  $node = \Drupal::routeMatch()
    ->getParameter('node');
  if ($node && $node->type === 'my_type') {
    $show_popup = FALSE;
  }
}