WordPress Wiki – Auto shutoff comments

November 28, 2004 · 2 comments

in general

Found this gem on the Wordpress Wiki: Auto shutoff comments. It includes code that you can use to create a plugin to automatically close comments after a set number of days – handy for keeping those evil spam roaches at bay.

I just copied the second block of text (the one by Scott Hanson) into a file called “Autoclose.php” and uploaded it into my Wordpress plugins directory. Went to my admin console and activated the plugin, and it seems to work just fine! At least this will keep the roaches confined to a small subset of posts on this weblog, instead of letting them roam unfettered over the 476 posts accumulated over the years…

{ 2 comments… read them below or add one }

1 David LeBer November 28, 2004 at 9:03 am

I’ve found this hack to be quite successful. It prevents link-bots that target the wp-comments-post.php file directly (by passing the comments form). I’ve had no spam comments since I enabled it (he says, furiously knocking on wood).

Reply

2 D'Arcy Norman November 28, 2004 at 9:21 am

David, thanks for the tip! I’ve just installed the plugin version of spam-stopgap. Here’s hoping it works!

Reply

Leave a Comment

Previous post:

Next post: