Make WordPress Core

Changeset 49127

Timestamp:
10/11/2020 07:27:21 PM (4 years ago)
Author:
johnbillion
Message:

Networks and Sites: Extract into a new function the email that gets sent to the network administrator when a new site is created, and introduce filters to disable and modify its

contents.

  • The send_new_site_email filter can be used to disable this email.
  • The new_site_email filter can be used to modify its contents.

Props Dhruvin, Dharm1025, dharmin16, jipmoors

Fixes #42134

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-new.php

    r47853 r49127  
    146146        }
    147147
    148         wp_mail(
    149             get_site_option( 'admin_email' ),
    150             sprintf(
    151                 /* translators: New site notification email subject. %s: Network title. */
    152                 __( '[%s] New Site Created' ),
    153                 get_network()->site_name
    154             ),
    155             sprintf(
    156                 /* translators: New site notification email. 1: User login, 2: Site URL, 3: Site title. */
    157                 __(
    158                     'New site created by %1$s
    159 
    160 Address: %2$s
    161 Name: %3$s'
    162                 ),
    163                 $current_user->user_login,
    164                 get_site_url( $id ),
    165                 wp_unslash( $title )
    166             ),
    167             sprintf(
    168                 'From: "%1$s" <%2$s>',
    169                 _x( 'Site Admin', 'email "From" field' ),
    170                 get_site_option( 'admin_email' )
    171             )
    172         );
     148        wpmu_new_site_admin_notification( $id, $user_id );
    173149        wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) );
    174150        wp_redirect(
  • trunk/src/wp-includes/ms-functions.php

    r49108 r49127  
    16881688
    16891689    wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
     1690
     1691
     1692
     1693
     1694
     1695
     1696
     1697
     1698
     1699
     1700
     1701
     1702
     1703
     1704
     1705
     1706
     1707
     1708
     1709
     1710
     1711
     1712
     1713
     1714
     1715
     1716
     1717
     1718
     1719
     1720
     1721
     1722
     1723
     1724
     1725
     1726
     1727
     1728
     1729
     1730
     1731
     1732
     1733
     1734
     1735
     1736
     1737
     1738
     1739
     1740
     1741
     1742
     1743
     1744
     1745
     1746
     1747
     1748
     1749
     1750
     1751
     1752
     1753
     1754
     1755
     1756
     1757
     1758
     1759
     1760
     1761
     1762
     1763
     1764
     1765
     1766
     1767
     1768
     1769
     1770
     1771
     1772
     1773
     1774
     1775
     1776
     1777
     1778
     1779
     1780
     1781
     1782
     1783
     1784
     1785
     1786
     1787
     1788
     1789
     1790
     1791
     1792
     1793
     1794
     1795
     1796
     1797
     1798
     1799
     1800
     1801
     1802
     1803
    16901804
    16911805    if ( $switched_locale ) {
Note: See TracChangeset for help on using the changeset viewer.