mirror of
git://develop.git.wordpress.org/
synced 2025-01-19 05:38:07 +01:00
git-svn-id: https://develop.svn.wordpress.org/trunk@2097 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7daf4f8b26
commit
7577e661b5
@ -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…
x
Reference in New Issue
Block a user