Plugin Directory


Opened 10 years ago

Closed 5 years ago

#902 closed enhancement (fixed)

Enhancement for Akismet

Reported by: Ozh Owned by: matt
Priority: normal Severity: normal
Plugin: akismet Keywords: akismet, has-patch, akismet-2.6


I have an enhancement proposal for Akismet: when catching a spam, don't return to comment page afterwards but instead clearly show the spammer that the comment was rejected.

Basically, when catching spam:

add_filter('comment_post_redirect', 'akismet_reject_screen');

function akismet_reject_screen() {
	header('HTTP/1.1 403 Forbidden');
	wp_die(__('Sorry, your comment was considered as spam and rejected'));

I don't see the point in wasting bandwidth, CPU and DB queries to show a page to someone who has been identified as a spammer :)

(other minor "enhancement" included: Matt's URL updated:)

Attachments (2)

akismet_die_on_spam.diff (1.5 KB) - added by Ozh 10 years ago.
Die on spam
akismet-902-discard-via-trash.patch (2.1 KB) - added by tellyworth 8 years ago.

Download all attachments as: .zip

Change History (11)

@Ozh10 years ago

Die on spam

comment:1 @tellyworth8 years ago

  • Keywords akismet-2.4 added

I'd suggest we should do the opposite:


comment:2 @tellyworth8 years ago

The new patch will:

  • redirect rather than die if a comment is discarded
  • put the comment in the trash rather than discard it entirely when the akismet_discard_month conditional is satisfied (option is set and the post hasn't been updated in more than 30 days)

For WP versions older than 2.9 (ie without trash support) it should keep the old behaviour.

comment:3 @josephscott8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [274580]) - When deleting spam comments on old posts, use the trash status.

Fixes #902 props tellyworth

  • Catch up on change log items

comment:4 @tellyworth8 years ago

  • Keywords akismet-2.5 added; akismet-2.4 removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

I reverted [274580] because it was causing confusion (users saw spam going to trash but didn't know why).

Postponing till 2.5. If we can use comment_meta to record why a comment is put in the trash it should eliminate that confusion.

comment:5 @tellyworth7 years ago

  • Keywords akismet-2.5 removed

removing the akismet-2.5 tag for now, till we decide how best to handle this

comment:6 @tellyworth7 years ago

For 2.5 here's what we'll do:

  1. Re-word the checkbox label to make the meaning of the akismet_discard_month setting clearer
  1. Replace the die() with a redirect.

Then re-visit this later, 2.6 perhaps.

comment:7 @tellyworth7 years ago

Checkbox label was reworded in [292719]

comment:8 @tellyworth7 years ago

  • Keywords akismet-2.6 added

comment:9 @xknown5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

The mentioned changes were introduced in r319990

Note: See TracTickets for help on using tickets.