You are here

function cookiebot_block_view in Cookiebot - Cookie consent, Cookie monitoring and Cookie control 7

Implements hook_block_view().

File

./cookiebot.module, line 252
The Cookiebot main module file.

Code

function cookiebot_block_view($delta = '') {
  $block = array();
  switch ($delta) {
    case 'cookiebot_declaration':
      $cbid = variable_get('cookiebot_cbid', '');
      if (empty($cbid)) {
        break;
      }
      $block['content'] = array(
        '#theme' => 'cookiebot_declaration',
        '#cookiebot_src' => 'https://consent.cookiebot.com/' . $cbid . '/cd.js',
      );
      break;
  }
  return $block;
}