File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,7 @@ function populate_options( array $options = array() ) {
421421 'use_smilies ' => 1 ,
422422 'require_name_email ' => 1 ,
423423 'comments_notify ' => 1 ,
424+ 'notes_notify ' => 1 ,
424425 'posts_per_rss ' => 10 ,
425426 'rss_use_excerpt ' => 0 ,
426427 'mailserver_url ' => 'mail.example.com ' ,
Original file line number Diff line number Diff line change 155155<td><fieldset><legend class="screen-reader-text"><span><?php echo $ email_me_whenever_title ; ?> </span></legend>
156156<label for="comments_notify">
157157<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked ( '1 ' , get_option ( 'comments_notify ' ) ); ?> />
158- <?php _e ( 'Anyone posts a comment or note ' ); ?> </label>
158+ <?php _e ( 'Anyone posts a comment ' ); ?> </label>
159159<br />
160160<label for="moderation_notify">
161161<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked ( '1 ' , get_option ( 'moderation_notify ' ) ); ?> />
162162<?php _e ( 'A comment is held for moderation ' ); ?> </label>
163+ <br />
164+ <label for="notes_notify">
165+ <input name="notes_notify" type="checkbox" id="notes_notify" value="1" <?php checked ( '1 ' , get_option ( 'notes_notify ' ) ); ?> />
166+ <?php _e ( 'Anyone posts a note ' ); ?> </label>
167+
163168</fieldset></td>
164169</tr>
165170<?php $ before_comment_appears_title = __ ( 'Before a comment appears ' ); ?>
Original file line number Diff line number Diff line change 125125 'comment_order ' ,
126126 'comment_registration ' ,
127127 'show_comments_cookies_opt_in ' ,
128+ 'notes_notify ' ,
128129 ),
129130 'media ' => array (
130131 'thumbnail_size_w ' ,
Original file line number Diff line number Diff line change @@ -2425,8 +2425,9 @@ function wp_new_comment_notify_moderator( $comment_id ) {
24252425 */
24262426function wp_new_comment_notify_postauthor ( $ comment_id ) {
24272427 $ comment = get_comment ( $ comment_id );
2428+ $ isNote = ( 'note ' === $ comment ->comment_type );
24282429
2429- $ maybe_notify = get_option ( 'comments_notify ' );
2430+ $ maybe_notify = $ isNote ? get_option ( ' notes_notify ' ) : get_option ( 'comments_notify ' );
24302431
24312432 /**
24322433 * Filters whether to send the post author new comment notification emails,
@@ -2450,7 +2451,7 @@ function wp_new_comment_notify_postauthor( $comment_id ) {
24502451 // Send notifications for approved comments and all notes.
24512452 if (
24522453 ! isset ( $ comment ->comment_approved ) ||
2453- ( '1 ' !== $ comment ->comment_approved && ' note ' !== $ comment -> comment_type ) ) {
2454+ ( '1 ' !== $ comment ->comment_approved && $ isNote ) ) {
24542455 return false ;
24552456 }
24562457
You can’t perform that action at this time.
0 commit comments