01 Dec 2006

Define Your Own Akismet Spam Deletion Period

By default, Akismet deletes old comments marked as “spam” after 15 days. After few minutes of tinkering, I’ve made a small modification to the source code that let’s you define your own number of days.

Download

You can configure the number of days before old spam comments to be deleted from Spam Deletion under PluginsAkismet Configuration.

Do It Yourself

Optionally, you can edit the value by editing akismet.php file. Open akismet.php, find:

$wpdb->query("DELETE FROM $wpdb->comments WHERE DATE_SUB('$now_gmt', INTERVAL 15 DAY) > comment_date_gmt AND comment_approved = 'spam'");

under akismet_delete_old() function and replace the number 15 with your own custom value.

Comments RSS feed TrackBack URL

2 Comments

  1. umm , great! thank you..

    Reply

  2. [...] Define Your Own Akismet Spam Deletion Period zeo akismet modositasa (tags: akismet zeo wordpress plugin) [...]

    Reply

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>