[wp-trac] [WordPress Trac] #16365: Comment transition for new comments

WordPress Trac wp-trac at lists.automattic.com
Sat May 21 17:33:16 UTC 2011


#16365: Comment transition for new comments
------------------------------------+-----------------------------
 Reporter:  MattyRob                |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Comments                |     Version:  3.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------------
Changes (by MattyRob):

 * keywords:  has-patch needs-testing => has-patch dev-feedback


Comment:

 I've tested out my changes with a plugin containing the following code:


 {{{
 function comment_transition($commentdata) {
         // put something in here to email when comments are made and see
 if we can report the hook used somehow
         $recipient = '<my email address here>';
         $subject = 'New to Spam hook';
         $mailtext = 'The "comment_new_to_spam" hook has been called';
         @wp_mail($recipient, $subject, $mailtext);
 }

 add_action('comment_new_to_spam', 'comment_transition');
 }}}

 On every new spam made on my site I got an email.

 Can we commit now please?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16365#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list