Opened 7 years ago
Closed 4 years ago
#42135 closed enhancement (duplicate)
Add filter to disable email sent by wp-admin/network/site-new.php
Reported by: | johnbillion | Owned by: | johnbillion |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | good-first-bug has-patch dev-feedback |
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 (5)
Change History (19)
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
7 years ago
#5
in reply to:
↑ description
@
7 years 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.
@
6 years ago
Add new function with hook - wpmu_new_site_notification - unify usability with wpmu_welcome_notification
@
6 years 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.
#8
@
5 years 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.
This ticket was mentioned in Slack in #core by sergey. View the logs.
5 years ago
#11
@
5 years ago
- Keywords dev-feedback added; needs-refresh removed
Hi,
In 42135.4.diff
, I refreshed the last patches and I edited up some function names and code.
I tested this code locally and it seems to work, but it will definitely needs a deep review.
Cheers,
Jb
Added a Filter to disable sending emails on creating a new site on WordPress Multisite.