git-svn-id: http://svn.automattic.com/wordpress/trunk@2097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e963f0fe5a
commit
f836050ca3
|
@ -615,7 +615,7 @@ function wp_get_comment_status($comment_id) {
|
|||
}
|
||||
}
|
||||
|
||||
function wp_notify_postauthor($comment_id, $comment_type='comment') {
|
||||
function wp_notify_postauthor($comment_id, $comment_type='') {
|
||||
global $wpdb;
|
||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||
|
||||
|
@ -629,6 +629,8 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') {
|
|||
|
||||
$blogname = get_settings('blogname');
|
||||
|
||||
if ( empty( $comment_type ) ) $comment_type = 'comment';
|
||||
|
||||
if ('comment' == $comment_type) {
|
||||
$notify_message = "New comment on your post #$comment->comment_post_ID \"".$post->post_title."\"\r\n\r\n";
|
||||
$notify_message .= "Author : $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\r\n";
|
||||
|
@ -654,6 +656,7 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') {
|
|||
$subject = '[' . $blogname . '] Pingback: "' .$post->post_title.'"';
|
||||
}
|
||||
$notify_message .= get_permalink($comment->comment_post_ID) . '#comments';
|
||||
$notify_message .= "\r\n\r\nTo delete this comment, visit: " . get_settings('siteurl') . "/wp-admin/post.php?action=confirmdeletecomment&p=".$comment->comment_post_ID."&comment=$comment_id";
|
||||
|
||||
if ('' == $comment->comment_author_email || '' == $comment->comment_author) {
|
||||
$from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>';
|
||||
|
|
|
@ -476,7 +476,7 @@ function wp_new_comment( $commentdata, $spam = false ) {
|
|||
wp_notify_moderator($comment_id);
|
||||
|
||||
if ( get_settings('comments_notify') && $approved )
|
||||
wp_notify_postauthor($comment_id, 'comment');
|
||||
wp_notify_postauthor($comment_id, $comment_type);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
|
Loading…
Reference in New Issue