diff --git src/wp-includes/pluggable.php src/wp-includes/pluggable.php
index 4a4776b264..882660ae3a 100644
|
|
|
function wp_password_change_notification( $user ) { |
| 1748 | 1748 | // we want to reverse this for the plain text arena of emails. |
| 1749 | 1749 | $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); |
| 1750 | 1750 | |
| 1751 | | /* translators: %s: site title */ |
| 1752 | | $subject = sprintf( __( '[%s] Password Changed' ), $blogname ); |
| | 1751 | $wp_password_change_notification_email = array( |
| | 1752 | 'to' => get_option( 'admin_email' ), |
| | 1753 | /* translators: Password change notification email subject. %s: Site title */ |
| | 1754 | 'subject' => __( '[%s] Password Changed' ), |
| | 1755 | 'message' => $message, |
| | 1756 | 'headers' => '', |
| | 1757 | ); |
| 1753 | 1758 | |
| 1754 | 1759 | /** |
| 1755 | | * Filters the subject of the password change notification email sent to the site admin. |
| | 1760 | * Filters the contents of the password change notification email sent to the site admin. |
| 1756 | 1761 | * |
| 1757 | 1762 | * @since 4.9.0 |
| 1758 | 1763 | * |
| 1759 | | * @param string $subject Email subject. |
| | 1764 | * @param array $wp_password_change_notification_email { |
| | 1765 | * Used to build wp_mail(). |
| | 1766 | * |
| | 1767 | * @type string $to The intended recipient - site admin email address. |
| | 1768 | * @type string $subject The subject of the email. |
| | 1769 | * @type string $message The body of the email. |
| | 1770 | * @type string $headers The headers of the email. |
| | 1771 | * } |
| 1760 | 1772 | * @param WP_User $user User object for user whose password was changed. |
| 1761 | 1773 | * @param string $blogname The site title. |
| 1762 | 1774 | */ |
| 1763 | | $subject = apply_filters( 'wp_password_change_notification_subject', $subject, $user, $blogname ); |
| | 1775 | $wp_password_change_notification_email = apply_filters( 'wp_password_change_notification_email', $wp_password_change_notification_email, $user, $blogname ); |
| 1764 | 1776 | |
| 1765 | | /** |
| 1766 | | * Filters the message body of the password change notification email sent to the site admin. |
| 1767 | | * |
| 1768 | | * @since 4.9.0 |
| 1769 | | * |
| 1770 | | * @param string $message Email message. |
| 1771 | | * @param WP_User $user User object for user whose password was changed. |
| 1772 | | */ |
| 1773 | | $message = apply_filters( 'wp_password_change_notification_message', $message, $user ); |
| 1774 | | |
| 1775 | | /** |
| 1776 | | * Filters the email headers of the password change notification admin email sent to the site admin. |
| 1777 | | * |
| 1778 | | * @since 4.9.0 |
| 1779 | | * |
| 1780 | | * @param string $headers Email headers. |
| 1781 | | * @param WP_User $user User object for user whose password was changed. |
| 1782 | | */ |
| 1783 | | $headers = apply_filters( 'wp_password_change_notification_headers', '', $user ); |
| 1784 | | |
| 1785 | | wp_mail( get_option( 'admin_email' ), wp_specialchars_decode( $subject ), $message, $headers ); |
| | 1777 | wp_mail( |
| | 1778 | $wp_password_change_notification_email['to'], |
| | 1779 | wp_specialchars_decode( sprintf( $wp_password_change_notification_email['subject'], $blogname ) ), |
| | 1780 | $wp_password_change_notification_email['message'], |
| | 1781 | $wp_password_change_notification_email['headers'] |
| | 1782 | ); |
| 1786 | 1783 | } |
| 1787 | 1784 | } |
| 1788 | 1785 | endif; |
| … |
… |
function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) |
| 1822 | 1819 | $switched_locale = switch_to_locale( get_locale() ); |
| 1823 | 1820 | |
| 1824 | 1821 | /* translators: %s: site title */ |
| 1825 | | $subject = sprintf( __( '[%s] New User Registration' ), $blogname ); |
| 1826 | | /* translators: %s: site title */ |
| 1827 | 1822 | $message = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n"; |
| 1828 | 1823 | /* translators: %s: user login */ |
| 1829 | 1824 | $message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n"; |
| 1830 | 1825 | /* translators: %s: user email address */ |
| 1831 | 1826 | $message .= sprintf( __( 'Email: %s' ), $user->user_email ) . "\r\n"; |
| 1832 | 1827 | |
| 1833 | | /** |
| 1834 | | * Filters the subject of the new user notification email sent to the site admin. |
| 1835 | | * |
| 1836 | | * @since 4.9.0 |
| 1837 | | * |
| 1838 | | * @param string $subject Email subject. |
| 1839 | | * @param WP_User $user User object for newly registered user. |
| 1840 | | * @param string $blogname The site title. |
| 1841 | | */ |
| 1842 | | $subject = apply_filters( 'wp_new_user_notification_admin_subject', $subject, $user, $blogname ); |
| | 1828 | $wp_new_user_notification_email_admin = array( |
| | 1829 | 'to' => get_option( 'admin_email' ), |
| | 1830 | /* translators: Password change notification email subject. %s: Site title */ |
| | 1831 | 'subject' => __( '[%s] New User Registration' ), |
| | 1832 | 'message' => $message, |
| | 1833 | 'headers' => '', |
| | 1834 | ); |
| 1843 | 1835 | |
| 1844 | 1836 | /** |
| 1845 | | * Filters the message body of the new user notification email sent to the site admin. |
| | 1837 | * Filters the contents of the new user notification email sent to the site admin. |
| 1846 | 1838 | * |
| 1847 | 1839 | * @since 4.9.0 |
| 1848 | 1840 | * |
| 1849 | | * @param string $message Email message. |
| 1850 | | * @param WP_User $user User object for newly registered user. |
| 1851 | | */ |
| 1852 | | $message = apply_filters( 'wp_new_user_notification_admin_message', $message, $user ); |
| 1853 | | |
| 1854 | | /** |
| 1855 | | * Filters the email headers of the new user notification email sent to the site admin. |
| 1856 | | * |
| 1857 | | * @since 4.9.0 |
| | 1841 | * @param array $wp_new_user_notification_email { |
| | 1842 | * Used to build wp_mail(). |
| 1858 | 1843 | * |
| 1859 | | * @param string $headers Email headers. |
| 1860 | | * @param WP_User $user User object for newly registered user. |
| | 1844 | * @type string $to The intended recipient - site admin email address. |
| | 1845 | * @type string $subject The subject of the email. |
| | 1846 | * @type string $message The body of the email. |
| | 1847 | * @type string $headers The headers of the email. |
| | 1848 | * } |
| | 1849 | * @param WP_User $user User object for new user. |
| | 1850 | * @param string $blogname The site title. |
| 1861 | 1851 | */ |
| 1862 | | $headers = apply_filters( 'wp_new_user_notification_admin_headers', '', $user ); |
| | 1852 | $wp_new_user_notification_email_admin = apply_filters( 'wp_new_user_notification_email_admin', $wp_new_user_notification_email_admin, $user, $blogname ); |
| 1863 | 1853 | |
| 1864 | | @wp_mail( get_option( 'admin_email' ), wp_specialchars_decode( $subject ), $message, $headers ); |
| | 1854 | @wp_mail( |
| | 1855 | $wp_new_user_notification_email_admin['to'], |
| | 1856 | wp_specialchars_decode( sprintf( $wp_new_user_notification_email_admin['subject'], $blogname ) ), |
| | 1857 | $wp_new_user_notification_email_admin['message'], |
| | 1858 | $wp_new_user_notification_email_admin['headers'] |
| | 1859 | ); |
| 1865 | 1860 | |
| 1866 | 1861 | if ( $switched_locale ) { |
| 1867 | 1862 | restore_previous_locale(); |
| … |
… |
function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) |
| 1889 | 1884 | |
| 1890 | 1885 | $switched_locale = switch_to_locale( get_user_locale( $user ) ); |
| 1891 | 1886 | |
| 1892 | | /* translators: %s: site title */ |
| 1893 | | $subject = sprintf( __( '[%s] Your username and password info' ), $blogname ); |
| 1894 | 1887 | /* translators: %s: user login */ |
| 1895 | 1888 | $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; |
| 1896 | 1889 | $message .= __('To set your password, visit the following address:') . "\r\n\r\n"; |
| … |
… |
function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) |
| 1898 | 1891 | |
| 1899 | 1892 | $message .= wp_login_url() . "\r\n"; |
| 1900 | 1893 | |
| 1901 | | /** |
| 1902 | | * Filters the subject of the new user email sent to the new user. |
| 1903 | | * |
| 1904 | | * @since 4.9.0 |
| 1905 | | * |
| 1906 | | * @param string $subject Email subject. |
| 1907 | | * @param WP_User $user User object for newly registered user. |
| 1908 | | * @param string $blogname The site title. |
| 1909 | | */ |
| 1910 | | $subject = apply_filters( 'wp_new_user_notification_subject', $subject, $user, $blogname ); |
| | 1894 | $wp_new_user_notification_email = array( |
| | 1895 | 'to' => $user->user_email, |
| | 1896 | /* translators: Password change notification email subject. %s: Site title */ |
| | 1897 | 'subject' => __( '[%s] Your username and password info' ), |
| | 1898 | 'message' => $message, |
| | 1899 | 'headers' => '', |
| | 1900 | ); |
| 1911 | 1901 | |
| 1912 | 1902 | /** |
| 1913 | | * Filters the message body of the new user email sent to the new user. |
| | 1903 | * Filters the contents of the new user notification email sent to the new user. |
| 1914 | 1904 | * |
| 1915 | 1905 | * @since 4.9.0 |
| 1916 | 1906 | * |
| 1917 | | * @param string $message Email message. |
| 1918 | | * @param WP_User $user User object for newly registered user. |
| 1919 | | * @param string $key User activation key. |
| 1920 | | */ |
| 1921 | | $message = apply_filters( 'wp_new_user_notification_message', $message, $user, $key ); |
| 1922 | | |
| 1923 | | /** |
| 1924 | | * Filters the email headers of the new user email sent to the new user. |
| 1925 | | * |
| 1926 | | * @since 4.9.0 |
| | 1907 | * @param array $wp_new_user_notification_email { |
| | 1908 | * Used to build wp_mail(). |
| 1927 | 1909 | * |
| 1928 | | * @param string $headers Email headers. |
| 1929 | | * @param WP_User $user User object for newly registered user. |
| | 1910 | * @type string $to The intended recipient - New user email address. |
| | 1911 | * @type string $subject The subject of the email. |
| | 1912 | * @type string $message The body of the email. |
| | 1913 | * @type string $headers The headers of the email. |
| | 1914 | * } |
| | 1915 | * @param WP_User $user User object for new user. |
| | 1916 | * @param string $blogname The site title. |
| 1930 | 1917 | */ |
| 1931 | | $headers = apply_filters( 'wp_new_user_notification_headers', '', $user ); |
| | 1918 | $wp_new_user_notification_email = apply_filters( 'wp_new_user_notification_email', $wp_new_user_notification_email, $user, $blogname ); |
| 1932 | 1919 | |
| 1933 | | wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $headers ); |
| | 1920 | wp_mail( |
| | 1921 | $wp_new_user_notification_email['to'], |
| | 1922 | wp_specialchars_decode( sprintf( $wp_new_user_notification_email['subject'], $blogname ) ), |
| | 1923 | $wp_new_user_notification_email['message'], |
| | 1924 | $wp_new_user_notification_email['headers'] |
| | 1925 | ); |
| 1934 | 1926 | |
| 1935 | 1927 | if ( $switched_locale ) { |
| 1936 | 1928 | restore_previous_locale(); |