[wp-trac] [WordPress Trac] #42134: Add filter to emails sent by wp-admin/network/site-new.php
WordPress Trac
noreply at wordpress.org
Fri Jun 7 12:20:10 UTC 2019
#42134: Add filter to emails sent by wp-admin/network/site-new.php
-------------------------------------------------+-------------------------
Reporter: johnbillion | Owner:
| johnbillion
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 5.3
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch needs- | Focuses: multisite
testing |
-------------------------------------------------+-------------------------
Comment (by jipmoors):
Looking at the code I'm seeing some places that can be improved. As this
is a stand-alone function better checking for unexpected situation will
improve functionality.
- get_userdata can return unexpected data, as the user ID doesn't have to
be valid
- $admin_notification is being determined using a filter, which can return
an empty value; an email should not be send if there is no message
Site tite:
Title is being provided as an argument to the function, but
`$current_network->site_name` is being used instead.
In this implementation `$current_network->site_name` is being set to a
value, this might have unwanted side-effects.
Some other concern I noticed:
The admin_email will be default in this patch to: 'support@' .
$_SERVER['SERVER_NAME']
But support is not a default emailbox. Suggesting to use "postmaster" or
even considering of returning a WP_Error and not sending an email at all.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42134#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list