Ticket #1786 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Add hook for blank or incorrect comment field errors

Reported by: filosofo Assigned to: markjaquith
Priority: normal Milestone: 2.1
Component: General Version: 1.6
Severity: normal Keywords: comments error bg|has-patch bg|commit
Cc:

Description

In this discussion (button patch for comment post section), someone suggested adding a function to improve the way WordPress handles blank comment fields and missing required emails (In other words, do something other than just die with 'Error: please enter a valid email address,' for example).

My attached patch instead adds a hook that will allow plugin authors and theme developers to create their own custom error responses.

The default action is the existing die behavior.

Attachments

wp-comments-post.php.diff (0.9 kB) - added by filosofo on 10/24/05 04:26:35.
wp-comments-post.php.2.diff (1.5 kB) - added by filosofo on 07/05/06 20:22:34.
A better version of the same idea, using wp_die

Change History

10/24/05 04:26:35 changed by filosofo

  • attachment wp-comments-post.php.diff added.

11/03/05 22:44:28 changed by markjaquith

  • keywords changed from comments error to comments error bg|has-patch bg|commit.
  • owner changed from anonymous to markjaquith.
  • status changed from new to assigned.

I like it!

11/14/05 10:04:57 changed by matt

  • milestone changed from 1.6 to 2.1.

07/05/06 20:22:34 changed by filosofo

  • attachment wp-comments-post.php.2.diff added.

A better version of the same idea, using wp_die

07/05/06 20:24:29 changed by filosofo

  • owner changed from markjaquith to filosofo.
  • status changed from assigned to new.

I've uploaded a new patch that uses wp_die to accomplish what I was hoping to do with this back when I started this ticket.

07/05/06 20:25:36 changed by filosofo

  • owner changed from filosofo to markjaquith.

Oops, didn't mean to change the assignment just now.

07/05/06 20:34:20 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [3984]) wp_die() for comment errors. Props filosofo. fixes #1786