You are here

function antibot_page_attachments in Antibot 8

Implements hook_page_attachments().

File

./antibot.module, line 88
Implements the antibot module.

Code

function antibot_page_attachments(array &$page) {

  // Adds noscript style to HEAD.
  $noscript_style = [
    '#tag' => 'style',
    '#value' => 'form.antibot * :not(.antibot-message) { display: none !important; }',
    '#noscript' => TRUE,
  ];
  $page['#attached']['html_head'][] = [
    $noscript_style,
    'antibot_style',
  ];
}