Make WordPress Core

Opened 16 years ago

Closed 15 years ago

Last modified 4 years ago

#1786 closed enhancement (fixed)

Add hook for blank or incorrect comment field errors

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


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 (2)

wp-comments-post.php.diff (961 bytes) - added by filosofo 16 years ago.
wp-comments-post.php.2.diff (1.5 KB) - added by filosofo 15 years ago.
A better version of the same idea, using wp_die

Download all attachments as: .zip

Change History (8)

#1 @markjaquith
16 years ago

  • Keywords bg|has-patch bg|commit added
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

I like it!

#2 @matt
16 years ago

  • Milestone changed from 1.6 to 2.1

15 years ago

A better version of the same idea, using wp_die

#3 @filosofo
15 years ago

  • 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.

#4 @filosofo
15 years ago

  • Owner changed from filosofo to markjaquith

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

#5 @ryan
15 years ago

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

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

This ticket was mentioned in Slack in #core-js by youknowriad. View the logs.

4 years ago

Note: See TracTickets for help on using tickets.