Shin

Fighting comment spam


As I mentioned before, I’m being hit by comment spam at a rate of hundreds a day. Akismet flags them as spam thank god, but I’d still prefer them not to even get recorded to begin with.
It seems automated and hitting older posts, so in an attempt to stop the tide I’ve disabled comments on posts older than 90 days. Unfortunately WordPress disregards its own settings when it comes to attachment pages, for this I had to sneak into wp-includes/comment.php and modify 2 lines.
In my current version (3.3.2) it’s lines 1963 & 2002, where I changed
$post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
to
$post_types = apply_filters( 'close_comments_for_post_types', array( 'post', 'attachment' ) );
Fingers crossed.

Comments

Comments are closed.

Work in progress... not home!
Trying to get all/most of the new code working before I start on the eyecandy.