WordPress.org

Make WordPress Core

Ticket #21729: comments_email.patch

File comments_email.patch, 883 bytes (added by pavelevap, 6 years ago)
  • wp-includes/pluggable.php

     
    10601060                if ( '' != $comment->comment_author_email )
    10611061                        $reply_to = "Reply-To: $comment->comment_author_email";
    10621062        } else {
    1063                 $from = "From: \"$comment->comment_author\" <$wp_email>";
    1064                 if ( '' != $comment->comment_author_email )
    1065                         $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>";
     1063                if ( '' != $comment->comment_author_email ) {
     1064                        $from = "From: \"$comment->comment_author\" <$comment->comment_author_email>";
     1065                        $reply_to = "Reply-To: \"$comment->comment_author\" <$comment->comment_author_email>";
     1066                } else {
     1067                        $from = "From: \"$comment->comment_author\" <$wp_email>";
     1068                }
    10661069        }
    10671070
    10681071        $message_headers = "$from\n"