function hook_eu_cookie_compliance_show_popup_alter in EU Cookie Compliance (GDPR Compliance) 8
Same name and namespace in other branches
- 7.2 eu_cookie_compliance.api.php \hook_eu_cookie_compliance_show_popup_alter()
- 7 eu_cookie_compliance.api.php \hook_eu_cookie_compliance_show_popup_alter()
- 2.0.x 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.
1 invocation of hook_eu_cookie_compliance_show_popup_alter()
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;
}
}