Make WordPress Core

Ticket #44396: 44396.2.diff

File 44396.2.diff, 4.3 KB (added by flixos90, 8 years ago)
  • src/wp-includes/user.php

     
    27332733                );
    27342734                update_user_meta( $current_user->ID, '_new_email', $new_user_email );
    27352735
    2736                 if ( is_multisite() ) {
    2737                         $sitename = get_site_option( 'site_name' );
    2738                 } else {
    2739                         $sitename = get_option( 'blogname' );
    2740                 }
     2736                $sitename = get_option( 'blogname' );
    27412737
    27422738                /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    27432739                $email_text = __(
     
    27852781                $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
    27862782                $content = str_replace( '###EMAIL###', $_POST['email'], $content );
    27872783                $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 );
    27892785
    27902786                wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ), $content );
    27912787
     
    30553051        $content = str_replace( '###MANAGE_URL###', esc_url_raw( $email_data['manage_url'] ), $content );
    30563052        $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content );
    30573053
    3058         $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     3054        $sitename = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    30593055
    30603056        $subject = sprintf(
    30613057                /* translators: 1: Site name. 2: Name of the confirmed action. */
    30623058                __( '[%1$s] Action Confirmed: %2$s' ),
    3063                 $blogname,
     3059                $sitename,
    30643060                $action_description
    30653061        );
    30663062
     
    30703066         * @since 4.9.7
    30713067         *
    30723068         * @param string $subject    The email subject.
    3073          * @param string $blogname   The name of the site.
     3069         * @param string $sitename   The name of the site.
    30743070         * @param array  $email_data {
    30753071         *     Data relating to the account action email.
    30763072         *
     
    30833079         *     @type string          $admin_email The administrator email receiving the mail.
    30843080         * }
    30853081         */
    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 );
    30873083
    30883084        $email_sent = wp_mail( $email_data['admin_email'], $subject, $content );
    30893085
     
    33603356                        'request_id'  => $request_id,
    33613357                        'confirm_key' => wp_generate_user_request_key( $request_id ),
    33623358                ), 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(),
    33653361        );
    33663362
    33673363        /* translators: Do not translate DESCRIPTION, CONFIRM_URL, SITENAME, SITEURL: those are placeholders. */
     
    34153411        $content = str_replace( '###SITENAME###', wp_specialchars_decode( $email_data['sitename'], ENT_QUOTES ), $content );
    34163412        $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content );
    34173413
    3418         $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     3414        $sitename = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    34193415
    34203416        /* 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'] );
    34223418
    34233419        /**
    34243420         * Filters the subject of the email sent when an account action is attempted.
     
    34263422         * @since 4.9.6
    34273423         *
    34283424         * @param string $subject    The email subject.
    3429          * @param string $blogname   The name of the site.
     3425         * @param string $sitename   The name of the site.
    34303426         * @param array  $email_data {
    34313427         *     Data relating to the account action email.
    34323428         *
     
    34383434         *     @type string          $siteurl     The site URL sending the mail.
    34393435         * }
    34403436         */
    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 );
    34423438
    34433439        return wp_mail( $email_data['email'], $subject, $content );
    34443440}