You are here

function template_preprocess_cookie_compliance in Simple Cookie Compliance 7

File

./simple_cookie_compliance.module, line 48
All the necessary functions for configuring and output.

Code

function template_preprocess_cookie_compliance(&$vars) {
  global $language;

  // The text to show in the area.
  $message = variable_get('simple_cookie_compliance_content_' . $language->language);
  if (empty($message)) {
    $message['value'] = t('This website uses cookies to help us give you the best experience when you visit our website. By continuing to use this website, you consent to our use of these cookies.');
  }
  $vars['message'] = filter_xss($message['value']);

  // The form and submit button.
  $button_text = check_plain(variable_get('simple_cookie_compliance_button_agree_' . $language->language, t('OK')));
  $vars['form'] = drupal_get_form('simple_cookie_compliance_dismiss_form');
}