WordPress.org

Make WordPress Core

Opened 22 months ago

Last modified 4 months ago

#42135 reviewing enhancement

Add filter to disable email sent by wp-admin/network/site-new.php

Reported by: johnbillion Owned by: johnbillion
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: good-first-bug has-patch
Focuses: multisite Cc:

Description

Related: #42134

wp-admin/network/site-new.php contains a call to wp_mail() which sends an email when a new site is created from Network Admin -> Sites -> Add New on Multisite. (Ref).

It's not possible to disable the email via a filter. One should be implemented similarly to the send_password_change_email filter. (Ref).

Attachments (4)

42135.patch (1.7 KB) - added by kartikparmar 22 months ago.
Added a Filter to disable sending emails on creating a new site on WordPress Multisite.
42135v1.patch (1.9 KB) - added by kartikparmar 22 months ago.
Comment added for the filter.
42135.2.patch (3.1 KB) - added by cmachu 12 months ago.
Add new function with hook - wpmu_new_site_notification - unify usability with wpmu_welcome_notification
42135.3.patch (4.2 KB) - added by dharmin16 11 months ago.
added the feature simmilar to wp_welcome_message(). E.g. Filter 'wpmu_admin_notification' to disable or bypass. Filter 'update_admin_notification' and 'update_admin_notification_subject'} to modify the content and subject line of the notification email.

Download all attachments as: .zip

Change History (12)

@kartikparmar
22 months ago

Added a Filter to disable sending emails on creating a new site on WordPress Multisite.

#1 @kartikparmar
22 months ago

  • Keywords has-patch added; needs-patch removed

@kartikparmar
22 months ago

Comment added for the filter.

#2 @johnbillion
21 months ago

  • Owner set to johnbillion
  • Status changed from new to reviewing

#3 @johnbillion
21 months ago

  • Milestone changed from Future Release to 5.0

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


20 months ago

#5 in reply to: ↑ description @thomaswm
18 months ago

Replying to johnbillion:

It's not possible to disable the email via a filter. One should be implemented similarly to the send_password_change_email filter. (Ref).

Instead of adding a filter for disabling these emails, we could put the code that is responsible for sending the email into a new function and call that function using a hook. This has been done in #33587 for comment notifications and also for signup notification emails in multisite.

@cmachu
12 months ago

Add new function with hook - wpmu_new_site_notification - unify usability with wpmu_welcome_notification

@dharmin16
11 months ago

added the feature simmilar to wp_welcome_message(). E.g. Filter 'wpmu_admin_notification' to disable or bypass. Filter 'update_admin_notification' and 'update_admin_notification_subject'} to modify the content and subject line of the notification email.

#6 @johnbillion
9 months ago

  • Milestone changed from 5.0 to 5.1

#7 @pento
6 months ago

  • Milestone changed from 5.1 to 5.2

#8 @desrosj
4 months ago

  • Milestone changed from 5.2 to 5.3

This ticket has not received any attention during the 5.2 cycle. With beta
1 tomorrow, going to punt this to 5.3.

Note: See TracTickets for help on using tickets.