diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index ace6ecaa7a..70a6eca535 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -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\" '; diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index 36599e1ea2..07cf28dfef 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -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;