#48554 closed enhancement (fixed)
$blog_id missing in the newblog_notify_siteadmin filter
| Reported by: | virgodesign | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.4 |
| Component: | Networks and Sites | Version: | 5.2.4 |
| Severity: | normal | Keywords: | good-first-bug has-patch has-dev-note |
| Cc: | Focuses: | multisite |
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)
#5
@
6 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/
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 46697: