Ticket #38763: 38763.2.patch
| File 38763.2.patch, 6.7 KB (added by , 9 years ago) |
|---|
-
src/wp-includes/ms-functions.php
764 764 * @param string $domain The new blog domain. 765 765 * @param string $path The new blog path. 766 766 * @param string $title The site title. 767 * @param string $user The user's login name.767 * @param string $user_login The user's login name. 768 768 * @param string $user_email The user's email address. 769 769 * @param string $key The activation key created in wpmu_signup_blog() 770 770 * @param array $meta By default, contains the requested privacy setting and lang_id. 771 771 * @return bool 772 772 */ 773 function wpmu_signup_blog_notification( $domain, $path, $title, $user , $user_email, $key, $meta = array() ) {773 function wpmu_signup_blog_notification( $domain, $path, $title, $user_login, $user_email, $key, $meta = array() ) { 774 774 /** 775 775 * Filters whether to bypass the new site email notification. 776 776 * … … 779 779 * @param string|bool $domain Site domain. 780 780 * @param string $path Site path. 781 781 * @param string $title Site title. 782 * @param string $user User login name.782 * @param string $user_login User login name. 783 783 * @param string $user_email User email address. 784 784 * @param string $key Activation key created in wpmu_signup_blog(). 785 785 * @param array $meta By default, contains the requested privacy setting and lang_id. 786 786 */ 787 if ( ! apply_filters( 'wpmu_signup_blog_notification', $domain, $path, $title, $user , $user_email, $key, $meta ) ) {787 if ( ! apply_filters( 'wpmu_signup_blog_notification', $domain, $path, $title, $user_login, $user_email, $key, $meta ) ) { 788 788 return false; 789 789 } 790 790 … … 801 801 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 802 802 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 803 803 804 $user = get_user_by( 'login', $user );804 $user = get_user_by( 'login', $user_login ); 805 805 $switched_locale = switch_to_locale( get_user_locale( $user ) ); 806 806 807 807 $message = sprintf( … … 816 816 * @param string $domain Site domain. 817 817 * @param string $path Site path. 818 818 * @param string $title Site title. 819 * @param string $user User login name.819 * @param string $user_login User login name. 820 820 * @param string $user_email User email address. 821 821 * @param string $key Activation key created in wpmu_signup_blog(). 822 822 * @param array $meta By default, contains the requested privacy setting and lang_id. … … 823 823 */ 824 824 apply_filters( 'wpmu_signup_blog_notification_email', 825 825 __( "To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your site here:\n\n%s" ), 826 $domain, $path, $title, $user , $user_email, $key, $meta826 $domain, $path, $title, $user_login, $user_email, $key, $meta 827 827 ), 828 828 $activate_url, 829 829 esc_url( "http://{$domain}{$path}" ), … … 840 840 * @param string $domain Site domain. 841 841 * @param string $path Site path. 842 842 * @param string $title Site title. 843 * @param string $user User login name.843 * @param string $user_login User login name. 844 844 * @param string $user_email User email address. 845 845 * @param string $key Activation key created in wpmu_signup_blog(). 846 846 * @param array $meta By default, contains the requested privacy setting and lang_id. … … 847 847 */ 848 848 apply_filters( 'wpmu_signup_blog_notification_subject', 849 849 __( '[%1$s] Activate %2$s' ), 850 $domain, $path, $title, $user , $user_email, $key, $meta850 $domain, $path, $title, $user_login, $user_email, $key, $meta 851 851 ), 852 852 $from_name, 853 853 esc_url( 'http://' . $domain . $path ) … … 876 876 * 877 877 * @since MU 878 878 * 879 * @param string $user The user's login name.879 * @param string $user_login The user's login name. 880 880 * @param string $user_email The user's email address. 881 881 * @param string $key The activation key created in wpmu_signup_user() 882 882 * @param array $meta By default, an empty array. 883 883 * @return bool 884 884 */ 885 function wpmu_signup_user_notification( $user , $user_email, $key, $meta = array() ) {885 function wpmu_signup_user_notification( $user_login, $user_email, $key, $meta = array() ) { 886 886 /** 887 887 * Filters whether to bypass the email notification for new user sign-up. 888 888 * 889 889 * @since MU 890 890 * 891 * @param string $user User login name.891 * @param string $user_login User login name. 892 892 * @param string $user_email User email address. 893 893 * @param string $key Activation key created in wpmu_signup_user(). 894 894 * @param array $meta Signup meta data. 895 895 */ 896 if ( ! apply_filters( 'wpmu_signup_user_notification', $user , $user_email, $key, $meta ) )896 if ( ! apply_filters( 'wpmu_signup_user_notification', $user_login, $user_email, $key, $meta ) ) 897 897 return false; 898 898 899 $user = get_user_by( 'login', $user );899 $user = get_user_by( 'login', $user_login ); 900 900 $switched_locale = switch_to_locale( get_user_locale( $user ) ); 901 901 902 902 // Send email with activation link. … … 914 914 * @since MU 915 915 * 916 916 * @param string $content Content of the notification email. 917 * @param string $user User login name.917 * @param string $user_login User login name. 918 918 * @param string $user_email User email address. 919 919 * @param string $key Activation key created in wpmu_signup_user(). 920 920 * @param array $meta Signup meta data. … … 921 921 */ 922 922 apply_filters( 'wpmu_signup_user_notification_email', 923 923 __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login." ), 924 $user , $user_email, $key, $meta924 $user_login, $user_email, $key, $meta 925 925 ), 926 926 site_url( "wp-activate.php?key=$key" ) 927 927 ); … … 933 933 * @since MU 934 934 * 935 935 * @param string $subject Subject of the notification email. 936 * @param string $user User login name.936 * @param string $user_login User login name. 937 937 * @param string $user_email User email address. 938 938 * @param string $key Activation key created in wpmu_signup_user(). 939 939 * @param array $meta Signup meta data. … … 940 940 */ 941 941 apply_filters( 'wpmu_signup_user_notification_subject', 942 942 __( '[%1$s] Activate %2$s' ), 943 $user , $user_email, $key, $meta943 $user_login, $user_email, $key, $meta 944 944 ), 945 945 $from_name, 946 $user 946 $user_login 947 947 ); 948 948 wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers ); 949 949