[wp-trac] [WordPress Trac] #33717: Send Notification Email When a Comment is Approved From Moderation
WordPress Trac
noreply at wordpress.org
Sun Sep 6 11:06:04 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: 4.4
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch needs- | Focuses:
testing |
-------------------------------------------------+-------------------------
Comment (by swissspidy):
Replying to [comment:20 mrahmadawais]:
> Added a check for if in case // The comment was left by the author & The
author moderated a comment on their own post
Thanks, good catch. However I noticed the following things with your
patch:
* Indentation is wrong throughout the function.
* `$author` isn't used anywhere
* `$notify_author` isn't defined anywhere, which would lead to an error.
[attachment:33717.4.diff 33717.4.diff] accommodates for that. Plus it
fixes the one multi-line comment.
> BTW we can use a better action i.e. `comment_unapproved_to_approved`
action is defined in function `wp_transition_comment_status` 1286
comment-functions.php.
I'd say the `transition_comment_status` hook can be more easily found and
debugged as the dynamic `comment_{$old_status}_to_{$new_status}` hook.
Also, does this work when the comment was previously trashed / mistakenly
marked as spam but then approved?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33717#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list