You are here

function cookiepro_process_html in CookiePro by OneTrust 7

Implements hook_process_html().

Add Header Scripts as defined.

File

./cookiepro.module, line 75
Enables Drupal to add CookiePro headers on site.

Code

function cookiepro_process_html(&$variables) {
  $header_scripts = variable_get('cookiepro_header_settings');
  if (isset($header_scripts) && !empty($header_scripts)) {
    if (!empty($header_scripts['styles'])) {
      $variables['styles'] .= $header_scripts['styles'] . PHP_EOL;
    }
    if (!empty($header_scripts['scripts'])) {
      $variables['scripts'] .= $header_scripts['scripts'] . PHP_EOL;
    }
  }
}