WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 20 months ago

Last modified 20 months ago

#22922 closed enhancement (fixed)

Add filter 'comment_notification_email_to' in wp_notify_postauthor()

Reported by: chipbennett Owned by: nacin
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.5
Component: Comments Keywords: has-patch needs-testing
Focuses: Cc:

Description

Currently, mailto: address is not filterable in pluggable function wp_notify_postauthor(). Thus, in order to send replies to email addresses other than the post author, the entire function must be overridden.

Patch makes mailto: filterable for wp_notify_postauthor(), moving $author->user_email to an array, and applying the 'comment_notification_email_to' filter.

Attachments (1)

pluggable.php.diff (666 bytes) - added by chipbennett 2 years ago.

Download all attachments as: .zip

Change History (5)

@chipbennett2 years ago

comment:2 @SergeyBiryukov20 months ago

  • Milestone changed from Awaiting Review to 3.7

Moving for review along with #20353.

comment:3 @nacin20 months ago

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

In 25104:

Add filters to the recipients of emails sent by wp_notify_postauthor() and wp_notify_moderator().

The new filters are called comment_notification_recipients and comment_moderation_recipients.

Add the context of $comment_id to the comment_moderation_headers filter, to match the comment_notification_headers filter.

props chipbennett.
fixes #22922, #20353.

comment:4 @SergeyBiryukov20 months ago

In 25105:

Use correct variable. see #22922.

Note: See TracTickets for help on using tickets.