Source of file CommentSpamProtection.php
Size: 0,741 Bytes - Last Modified: 2021-12-23T10:34:42+00:00
/var/www/docs.ssmods.com/process/src/code/Extension/CommentSpamProtection.php
123456789101112131415161718192021222324252627282930313233 | <?php namespace SilverStripe\SpamProtection\Extension; use SilverStripe\Core\Extension; /** * Apply the spam protection to the comments module if it is installed. * * @package spamprotection */ class CommentSpamProtection extends Extension { public function alterCommentForm(&$form) { $form->enableSpamProtection(array( 'name' => 'IsSpam', 'mapping' => array( 'Name' => 'authorName', 'Email' => 'authorEmail', 'URL' => 'authorUrl', 'Comment' => 'body', 'ReturnURL' => 'contextUrl' ), 'checks' => array( 'spam', 'profanity' ) )); } } |