You are here

function honeypot_install in Honeypot 2.0.x

Same name and namespace in other branches
  1. 8 honeypot.install \honeypot_install()
  2. 6 honeypot.install \honeypot_install()
  3. 7 honeypot.install \honeypot_install()

Implements hook_install().

File

./honeypot.install, line 47
Contains install and update functions for Honeypot.

Code

function honeypot_install() {
  if (PHP_SAPI !== 'cli') {
    $config_url = Url::fromUri('base://admin/config/content/honeypot');
    \Drupal::messenger()
      ->addMessage(t('Honeypot installed successfully. Please <a href=":url">configure Honeypot</a> to protect your forms from spam bots.', [
      ':url' => $config_url
        ->toString(),
    ]));
  }
}