#48554 closed enhancement (fixed)
$blog_id missing in the newblog_notify_siteadmin filter
Reported by: | virgodesign | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | 5.2.4 |
Component: | Networks and Sites | Keywords: | good-first-bug has-patch has-dev-note |
Focuses: | multisite | Cc: |
Description
Hi,
in a wordpress multisite environment there is the newblog_notify_siteadmin( $blog_id, $deprecated )
function that notifies the network admin that a new site has been activated. This function prepare and send the email notice to the network admin just after a news site has been created.
The message is filtered by the newblog_notify_siteadmin
hook before the email is sent.
In my opinion this filter does not give a real chance to customize the message because there is no informations passed in about the new created blog.
This is how the filter is
$msg = apply_filters( 'newblog_notify_siteadmin', $msg );
and this is how it should be
$msg = apply_filters( 'newblog_notify_siteadmin', $msg, $blog_id );
This will also create consistency with the
$msg = apply_filters( 'newuser_notify_siteadmin', $msg, $user );
filter, also located in ms-functions.php and related to the new user registration.
Attachments (3)
Change History (8)
#1
@
5 years ago
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to 5.4
#3
@
5 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
#5
@
5 years ago
- Keywords has-dev-note added; needs-dev-note removed
Documentation added in the miscellaneous changes dev note: https://make.wordpress.org/core/2020/02/26/miscellaneous-developer-focused-changes-in-wordpress-5-4/
In 46697: