WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#12188 closed enhancement (fixed)

Add filters to duplicate comment message and comment flood message

Reported by: jeffstieler Owned by: 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 5 years ago.

Download all attachments as: .zip

Change History (5)

@jeffstieler5 years ago

comment:1 @nacin5 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.

comment:2 @skithund5 years ago

  • Cc toni.viemero@… added

+1

This relates to ticket:9775

comment:3 @nacin5 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.

comment:4 @nacin5 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.