Avoiding Comment Moderation
-
Comment moderation of common spam words can get tedious at times. Basically I want WordPress to ignore comments with a spam word in, but allow others through. I can do this by modifying wp-comments-post.php by adding
if ($approved) {
before
$wpdb->query("INSERT INTO $tablecomments
and adding
}
after
$comment_ID = $wpdb->get_var('SELECT last_insert_id()');
and finally commenting out the lines
if (!$approved) {
wp_notify_moderator($comment_ID);
}
But I feel this would be better done by using a plugin. But I can’t see how to do that to prevent a comment being inserted into the database. Any ideas?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Avoiding Comment Moderation’ is closed to new replies.