[wp-trac] [WordPress Trac] #33717: Send Notification Email When a Comment is Approved From Moderation

WordPress Trac noreply at wordpress.org
Sun Sep 6 09:30:54 UTC 2015


#33717: Send Notification Email When a Comment is Approved From Moderation
-------------------------------------------------+-------------------------
 Reporter:  jeffr0                               |       Owner:  swissspidy
     Type:  feature request                      |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
Component:  Comments                             |  Release
 Severity:  normal                               |     Version:
 Keywords:  good-first-bug has-patch needs-      |  Resolution:
  testing                                        |     Focuses:
-------------------------------------------------+-------------------------
Changes (by swissspidy):

 * keywords:  needs-patch good-first-bug => good-first-bug has-patch needs-
     testing


Comment:

 What [attachment:33717.2.diff 33717.2.diff] does:

 * Adds a new function called `wp_notify_commenter` which is hooked to
 `transition_comment_status`
 * Includes two new filters:
  * `comment_approval_notification_text`
  * `comment_approval_notification_subject`
 * Changes the `Your comment is awaiting moderation.` text to `Your comment
 is awaiting moderation. You will receive an email when it gets approved.`

 The email looks as follows:

 >Howdy Jane Doe,
 >
 >Your comment on the post "Hello World" got approved.
 >
 >View comment: http://src.wordpress-develop.dev/2015/09/06/hello-
 world/#comment-16

 Changes to the first patch:

 * Email is only sent when comment gets approved, not when it got trashed
 etc.
 *  No `comment_notification_notify_commenter` filter. Functionality can be
 easily disabled using `remove_action( 'transition_comment_status',
 'wp_notify_commenter' )`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33717#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list