Title: Simple CommentSpam hack?
Last modified: August 18, 2016

---

# Simple CommentSpam hack?

 *  [lennartf](https://wordpress.org/support/users/lennartf/)
 * (@lennartf)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/simple-commentspam-hack/)
 * In the WordPress Admin GUI: Options/Discussions are two Comment Moderation filters:
   Number of URLs allowed in a comment and a list of forbidden words.
    In the functions.
   php file is the function check_comment which matches against ‘comment_max_links’
   and the forbidden words, called ‘moderation_keys’. (Ought to be called ‘forbidden_words’)
 * If I after the line: $word = trim($word); add the line $word=strtolower($word);
   I don’t have to worry about upper and lower casing the forbidden words.
 * Then: If check_comment returns false we set the variable $aproved=1.
    If I under
   this line add the new line: die( __(‘Spam word encountered. Comment not allowed’));
 * Would I not make the default WordPress spamguard stronger and allow it to simply
   discard all comments flagged before they reach the moderation queues in the comment
   table?

Viewing 1 replies (of 1 total)

 *  [darkcryst](https://wordpress.org/support/users/darkcryst/)
 * (@darkcryst)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/simple-commentspam-hack/#post-141398)
 * an interesting point… at first thought it makes sense… something is niggling 
   at my mind about it tho.

Viewing 1 replies (of 1 total)

The topic ‘Simple CommentSpam hack?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [darkcryst](https://wordpress.org/support/users/darkcryst/)
 * Last activity: [21 years, 3 months ago](https://wordpress.org/support/topic/simple-commentspam-hack/#post-141398)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
