Changeset 16304 for trunk/wp-includes/pluggable.php
- Timestamp:
- 11/11/2010 04:28:49 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable.php
r16223 r16304 999 999 * @return bool False if user email does not exist. True on completion. 1000 1000 */ 1001 function wp_notify_postauthor($comment_id, $comment_type='') { 1002 $comment = get_comment($comment_id); 1003 $post = get_post($comment->comment_post_ID); 1004 $user = get_userdata( $post->post_author ); 1005 $moderating_user = wp_get_current_user(); 1006 $moderating_uid = (int) $user->id; 1007 1008 if ( $comment->user_id == $post->post_author ) return false; // The comment was left by the author. 1009 1010 if ( $user->user_id == $moderating_uid ) return false; // The author moderated a comment on his own post 1011 1012 if ('' == $user->user_email) return false; // If there's no email to send the comment to 1001 function wp_notify_postauthor( $comment_id, $comment_type = '' ) { 1002 $comment = get_comment( $comment_id ); 1003 $post = get_post( $comment->comment_post_ID ); 1004 $author = get_userdata( $post->post_author ); 1005 1006 // The comment was left by the author 1007 if ( $comment->user_id == $post->post_author ) 1008 return false; 1009 1010 // The author moderated a comment on his own post 1011 if ( $post->post_author == get_current_user_id() ) 1012 return false; 1013 1014 // If there's no email to send the comment to 1015 if ( '' == $author->user_email ) 1016 return false; 1013 1017 1014 1018 $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); … … 1080 1084 $message_headers = apply_filters('comment_notification_headers', $message_headers, $comment_id); 1081 1085 1082 @wp_mail( $user->user_email, $subject, $notify_message, $message_headers);1086 @wp_mail( $author->user_email, $subject, $notify_message, $message_headers ); 1083 1087 1084 1088 return true;
Note: See TracChangeset
for help on using the changeset viewer.