You are here

function copyprevention_preprocess_html in Copy Prevention 7

Same name and namespace in other branches
  1. 8 copyprevention.module \copyprevention_preprocess_html()

Implements hook_preprocess_html().

File

./copyprevention.module, line 46
Main file for Copy Prevention module.

Code

function copyprevention_preprocess_html(&$vars) {
  if (user_access('bypass copy prevention')) {
    return;
  }
  $body_settings = array_filter(variable_get('copyprevention_body', array()));
  foreach ($body_settings as $value) {
    $vars['attributes_array']['on' . $value] = 'return false;';
  }
}