Make WordPress Core

Ticket #23578: 23578.diff

File 23578.diff, 1.0 KB (added by iandunn, 11 years ago)
  • src/wp-login.php

     
    249249        $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
    250250        $message .= __('If this was a mistake, just ignore this email and nothing will happen.') . "\r\n\r\n";
    251251        $message .= __('To reset your password, visit the following address:') . "\r\n\r\n";
    252         $message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";
    253252
     253        $retrieve_password_url = network_site_url( 'wp-login.php?action=rp&key='. $key .'&login=' . rawurlencode( $user_login ), 'login' );
     254        if ( 'text/html' == apply_filters( 'wp_mail_content_type', 'text/plain' ) ) {
     255                $message = nl2br( $message ) . '<a href="'. $retrieve_password_url .'">'. $retrieve_password_url .'</a><br />';
     256        } else {
     257                $message .= '<' . $retrieve_password_url . '>' . "\r\n";
     258        }
     259
    254260        if ( is_multisite() )
    255261                $blogname = $GLOBALS['current_site']->site_name;
    256262        else