Changeset 27568
- Timestamp:
- 03/17/2014 08:30:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r27567 r27568 1033 1033 1034 1034 // Who to notify? By default, just the post author, but others can be added. 1035 $emails = array( $author->user_email ); 1035 $emails = array(); 1036 if ( $author ) { 1037 $emails[] = $author->user_email; 1038 } 1036 1039 1037 1040 /** … … 1071 1074 1072 1075 // The comment was left by the author 1073 if ( ! $notify_author && $comment->user_id == $post->post_author ) {1076 if ( $author && ! $notify_author && $comment->user_id == $post->post_author ) { 1074 1077 unset( $emails[ $author->user_email ] ); 1075 1078 } 1076 1079 1077 1080 // The author moderated a comment on their own post 1078 if ( ! $notify_author && $post->post_author == get_current_user_id() ) {1081 if ( $author && ! $notify_author && $post->post_author == get_current_user_id() ) { 1079 1082 unset( $emails[ $author->user_email ] ); 1080 1083 } 1081 1084 1082 1085 // The post author is no longer a member of the blog 1083 if ( ! $notify_author && ! user_can( $post->post_author, 'read_post', $post->ID ) ) {1086 if ( $author && ! $notify_author && ! user_can( $post->post_author, 'read_post', $post->ID ) ) { 1084 1087 unset( $emails[ $author->user_email ] ); 1085 1088 }
Note: See TracChangeset
for help on using the changeset viewer.