function cleantalk_comment_presave in Anti Spam by CleanTalk 7.4
Same name and namespace in other branches
- 8.4 cleantalk.module \cleantalk_comment_presave()
- 8 cleantalk.module \cleantalk_comment_presave()
- 8.3 cleantalk.module \cleantalk_comment_presave()
- 7.5 cleantalk.module \cleantalk_comment_presave()
- 7 cleantalk.module \cleantalk_comment_presave()
- 7.2 cleantalk.module \cleantalk_comment_presave()
- 9.1.x cleantalk.module \cleantalk_comment_presave()
Implements hook_comment_presave().
File
- ./
cleantalk.module, line 162 - Main CleanTalk integration module functions.
Code
function cleantalk_comment_presave($comment) {
$ct_result = CleantalkFuncs::_cleantalk_ct_result();
if (!empty($ct_result['ct_request_id'])) {
if ($ct_result['ct_result_allow'] === 0 && variable_get('cleantalk_check_comments_automod', 0) === 1) {
$comment->status = COMMENT_NOT_PUBLISHED;
}
}
}