From 7577e661b52107be409f1f77725cdb49e7c9fef6 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Sat, 15 Jan 2005 01:07:53 +0000 Subject: [PATCH] http://mosquito.wordpress.org/view.php?id=684 git-svn-id: https://develop.svn.wordpress.org/trunk@2097 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment-functions.php | 5 ++++- wp-includes/functions-post.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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;