Changes between Initial Version and Version 1 of Ticket #25699, comment 2
- Timestamp:
- 10/27/2013 08:11:49 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25699, comment 2
initial v1 23 23 1. In wp_new_comment(), a check for multiple recipients needs to be added to the if condition, something along the lines of: 24 24 {{{ 25 $recipients = 0; 25 26 $recipients = count( apply_filters( 'comment_notification_recipients', $recipients, $comment_id ) ); 26 27 ... 27 28 ... 28 if ( get_option('comments_notify') && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] || $recipients > 1) )29 if ( get_option('comments_notify') && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] || $recipients > 0 ) ) 29 30 wp_notify_postauthor($comment_ID, isset( $commentdata['comment_type'] ) ? $commentdata['comment_type'] : '' ); 30 31 }}} … … 32 33 2. A similar check would need to be added to wp_notify_postauthor in pluggable.php to prevent it from returning in the case of multiple recipients: 33 34 {{{ 35 $recipients = 0; 34 36 $recipients = count( apply_filters( 'comment_notification_recipients', $recipients, $comment_id ) ); 35 37 ... 36 38 ... 37 39 // The comment was left by the author 38 if ( $comment->user_id == $post->post_author && $recipients <= 1)40 if ( $comment->user_id == $post->post_author && $recipients == 0 ) 39 41 return false; 40 42 }}}