Make WordPress Core

Opened 9 years ago

Closed 6 years ago

Last modified 6 years ago

#42133 closed enhancement (fixed)

Add filter to emails sent by wp_new_blog_notification()

Reported by: johnbillion Owned by: johnbillion
Priority: normal Milestone: 5.6
Component: Upgrade/Install Version: 2.1
Severity: normal Keywords: good-first-bug has-patch dev-feedback has-dev-note
Cc: Focuses:

Description (last modified by johnbillion)

wp_new_blog_notification() contains a call to wp_mail() which sends an email when WordPress is first installed and when a site is added to a Multisite network. (Ref).

The contents of the email cannot be filtered. The recipient, subject, message, and headers should be passed through a filter in the same format as the password_change_email filter. (Ref).

Attachments (2)

42133.patch​ (3.2 KB ) - added by Dharm1025 9 years ago.
All data now passed through a filter.
42133.1.diff​ (3.4 KB ) - added by nikolam 8 years ago.
Refreshed the patch. Cleared up the code a bit

Download all attachments as: .zip

Change History (16)

@Dharm1025
9 years ago

All data now passed through a filter.

#1 @Dharm1025
9 years ago

  • Keywords has-patch added; needs-patch removed

#2 @johnbillion
9 years ago

  • Owner set to johnbillion
  • Status new → reviewing

#3 @johnbillion
9 years ago

  • Milestone Future Release → 5.0

This ticket was mentioned in ​Slack in #core-multisite by flixos90. ​View the logs.


9 years ago

@nikolam
8 years ago

Refreshed the patch. Cleared up the code a bit

#5 @nikolam
8 years ago

  • Keywords dev-feedback added

#6 @johnbillion
8 years ago

  • Milestone 5.0 → 5.1

#7 @flixos90
8 years ago

  • Milestone 5.1 → Future Release

#9 @johnbillion
6 years ago

  • Milestone Future Release → 5.6

#10 @johnbillion
6 years ago

  • Description modified (diff)

#11 @johnbillion
6 years ago

  • Focuses multisite removed

#12 @johnbillion
6 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 49048:

Upgrade/Install: Introduce the wp_installed_email filter for filtering the contents of the email sent when WordPress is installed, without needing to override the wp_new_blog_notification() pluggable function.

Props Dharm1025, nikolam, johnbillion

Fixes #42133

#13 @desrosj
6 years ago

  • Keywords needs-dev-note added

Let's note this new filter in the miscellaneous dev note.

Note: See TracTickets for help on using tickets.