Ticket #44396: 44396.2.diff
| File 44396.2.diff, 4.3 KB (added by , 8 years ago) |
|---|
-
src/wp-includes/user.php
2733 2733 ); 2734 2734 update_user_meta( $current_user->ID, '_new_email', $new_user_email ); 2735 2735 2736 if ( is_multisite() ) { 2737 $sitename = get_site_option( 'site_name' ); 2738 } else { 2739 $sitename = get_option( 'blogname' ); 2740 } 2736 $sitename = get_option( 'blogname' ); 2741 2737 2742 2738 /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */ 2743 2739 $email_text = __( … … 2785 2781 $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail=' . $hash ) ), $content ); 2786 2782 $content = str_replace( '###EMAIL###', $_POST['email'], $content ); 2787 2783 $content = str_replace( '###SITENAME###', wp_specialchars_decode( $sitename, ENT_QUOTES ), $content ); 2788 $content = str_replace( '###SITEURL###', network_home_url(), $content );2784 $content = str_replace( '###SITEURL###', home_url(), $content ); 2789 2785 2790 2786 wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ), $content ); 2791 2787 … … 3055 3051 $content = str_replace( '###MANAGE_URL###', esc_url_raw( $email_data['manage_url'] ), $content ); 3056 3052 $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content ); 3057 3053 3058 $ blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );3054 $sitename = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); 3059 3055 3060 3056 $subject = sprintf( 3061 3057 /* translators: 1: Site name. 2: Name of the confirmed action. */ 3062 3058 __( '[%1$s] Action Confirmed: %2$s' ), 3063 $ blogname,3059 $sitename, 3064 3060 $action_description 3065 3061 ); 3066 3062 … … 3070 3066 * @since 4.9.7 3071 3067 * 3072 3068 * @param string $subject The email subject. 3073 * @param string $ blogname The name of the site.3069 * @param string $sitename The name of the site. 3074 3070 * @param array $email_data { 3075 3071 * Data relating to the account action email. 3076 3072 * … … 3083 3079 * @type string $admin_email The administrator email receiving the mail. 3084 3080 * } 3085 3081 */ 3086 $subject = apply_filters( 'user_request_confirmed_email_subject', $subject, $ blogname, $email_data );3082 $subject = apply_filters( 'user_request_confirmed_email_subject', $subject, $sitename, $email_data ); 3087 3083 3088 3084 $email_sent = wp_mail( $email_data['admin_email'], $subject, $content ); 3089 3085 … … 3360 3356 'request_id' => $request_id, 3361 3357 'confirm_key' => wp_generate_user_request_key( $request_id ), 3362 3358 ), wp_login_url() ), 3363 'sitename' => is_multisite() ? get_site_option( 'site_name' ) :get_option( 'blogname' ),3364 'siteurl' => network_home_url(),3359 'sitename' => get_option( 'blogname' ), 3360 'siteurl' => home_url(), 3365 3361 ); 3366 3362 3367 3363 /* translators: Do not translate DESCRIPTION, CONFIRM_URL, SITENAME, SITEURL: those are placeholders. */ … … 3415 3411 $content = str_replace( '###SITENAME###', wp_specialchars_decode( $email_data['sitename'], ENT_QUOTES ), $content ); 3416 3412 $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content ); 3417 3413 3418 $ blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );3414 $sitename = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); 3419 3415 3420 3416 /* translators: Privacy data request subject. 1: Site name, 2: Name of the action */ 3421 $subject = sprintf( __( '[%1$s] Confirm Action: %2$s' ), $ blogname, $email_data['description'] );3417 $subject = sprintf( __( '[%1$s] Confirm Action: %2$s' ), $sitename, $email_data['description'] ); 3422 3418 3423 3419 /** 3424 3420 * Filters the subject of the email sent when an account action is attempted. … … 3426 3422 * @since 4.9.6 3427 3423 * 3428 3424 * @param string $subject The email subject. 3429 * @param string $ blogname The name of the site.3425 * @param string $sitename The name of the site. 3430 3426 * @param array $email_data { 3431 3427 * Data relating to the account action email. 3432 3428 * … … 3438 3434 * @type string $siteurl The site URL sending the mail. 3439 3435 * } 3440 3436 */ 3441 $subject = apply_filters( 'user_request_action_email_subject', $subject, $ blogname, $email_data );3437 $subject = apply_filters( 'user_request_action_email_subject', $subject, $sitename, $email_data ); 3442 3438 3443 3439 return wp_mail( $email_data['email'], $subject, $content ); 3444 3440 }