/** * Resets the object values to be re-used anew */ public function reset() { parent::reset(); $this->sCommentStatus = ''; $this->sCommentStatusExplanation = ''; self::$sSpamBlacklistFile = $this->getFeatureOptions()->getResourcesDir() . 'spamblacklist.txt'; }
/** */ public function run() { /** @var ICWP_WPSF_FeatureHandler_CommentsFilter $oFO */ $oFO = $this->getFeatureOptions(); add_filter($oFO->doPluginPrefix('if-do-comments-check'), array($this, 'getIfDoCommentsCheck')); if ($this->getIsOption('enable_comments_gasp_protection', 'Y')) { require_once dirname(__FILE__) . ICWP_DS . 'commentsfilter_antibotspam.php'; $oBotSpamProcessor = new ICWP_WPSF_Processor_CommentsFilter_AntiBotSpam($oFO); $oBotSpamProcessor->run(); } if ($this->getIsOption('enable_comments_human_spam_filter', 'Y') && $this->loadWpCommentsProcessor()->isCommentPost()) { require_once dirname(__FILE__) . ICWP_DS . 'commentsfilter_humanspam.php'; $oHumanSpamProcessor = new ICWP_WPSF_Processor_CommentsFilter_HumanSpam($oFO); $oHumanSpamProcessor->run(); } add_filter('pre_comment_approved', array($this, 'doSetCommentStatus'), 1); add_filter('pre_comment_content', array($this, 'doInsertCommentStatusExplanation'), 1, 1); add_filter('comment_notification_recipients', array($this, 'doClearCommentNotificationEmail_Filter'), 100, 1); }