[wp-trac] [WordPress Trac] #48554: $blog_id missing in the newblog_notify_siteadmin filter

WordPress Trac noreply at wordpress.org
Sun Nov 10 14:05:21 UTC 2019


#48554: $blog_id missing in the newblog_notify_siteadmin filter
--------------------------------+-----------------------------
 Reporter:  virgodesign         |      Owner:  (none)
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  5.2.4
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48554>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list