Ticket #23136: 23136.2.diff
File 23136.2.diff, 2.1 KB (added by , 11 years ago) |
---|
-
wp-includes/pluggable.php
989 989 $post = get_post( $comment->comment_post_ID ); 990 990 $author = get_userdata( $post->post_author ); 991 991 992 // The post author is no longer a member of the blog993 if ( ! is_user_member_of_blog( $post->post_author ) )994 return false;995 996 992 // The comment was left by the author 997 993 if ( $comment->user_id == $post->post_author ) 998 994 return false; … … 1001 997 if ( $post->post_author == get_current_user_id() ) 1002 998 return false; 1003 999 1000 // The post author is no longer a member of the blog 1001 if ( ! user_can( $post->post_author, 'read_post', $post->ID ) ) 1002 return false; 1003 1004 1004 // If there's no email to send the comment to 1005 1005 if ( '' == $author->user_email ) 1006 1006 return false; … … 1045 1045 } 1046 1046 $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n"; 1047 1047 $notify_message .= sprintf( __('Permalink: %s'), get_permalink( $comment->comment_post_ID ) . '#comment-' . $comment_id ) . "\r\n"; 1048 if ( EMPTY_TRASH_DAYS )1049 $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c=$comment_id") ) . "\r\n";1050 else1051 $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n";1052 $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n";1053 1048 1049 if ( user_can( $post->post_author, 'edit_comment', $comment_id ) ) { 1050 if ( EMPTY_TRASH_DAYS ) 1051 $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c=$comment_id") ) . "\r\n"; 1052 else 1053 $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n"; 1054 $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n"; 1055 } 1056 1054 1057 $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); 1055 1058 1056 1059 if ( '' == $comment->comment_author ) {