Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12188 closed enhancement (fixed)

Add filters to duplicate comment message and comment flood message

Reported by: jeffstieler's profile jeffstieler Owned by: nacin's profile nacin
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Comments Keywords: has-patch
Focuses: Cc:

Description

Pretty self explanatory..

Attachments (1)

comment.php.diff (1.4 KB) - added by jeffstieler 15 years ago.

Download all attachments as: .zip

Change History (5)

#1 @nacin
15 years ago

  • Milestone changed from Unassigned to 3.0

+1, though I think it would be better as an action instead, just before the DOING_AJAX check. That way, you can die with your own message, or perhaps do something else, like redirect back to the post and show a message of your own.

#2 @skithund
15 years ago

  • Cc toni.viemero@… added

+1

This relates to ticket:9775

#3 @nacin
15 years ago

  • Owner set to nacin
  • Status changed from new to accepted

Okay, +1 was with some caveats. You can already hypothetically filter the text itself with the gettext filter.

There is already an action, comment_flood_trigger, which is executed before the die()/wp_die() in the flood message. I'm adding a comment_duplicate_trigger as a complement.

#4 @nacin
15 years ago

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

(In [13434]) Add comment_duplicate_trigger hook that is fired when a duplicate comment is detected. Fixes #12188

Note: See TracTickets for help on using tickets.