Skip to content

Commit 7cfb3c2

Browse files
Ensure calls to get_option( 'wp_notes_notify’… use 1 default
1 parent 4e9f2ef commit 7cfb3c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wp-admin/options-discussion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
<?php _e( 'A comment is held for moderation' ); ?> </label>
163163
<br />
164164
<label for="wp_notes_notify">
165-
<input name="wp_notes_notify" type="checkbox" id="wp_notes_notify" value="1" <?php checked( '1', get_option( 'wp_notes_notify' ) ); ?> />
165+
<input name="wp_notes_notify" type="checkbox" id="wp_notes_notify" value="1" <?php checked( '1', get_option( 'wp_notes_notify', 1 ) ); ?> />
166166
<?php _e( 'Anyone posts a note' ); ?> </label>
167167

168168
</fieldset></td>

src/wp-includes/comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2427,7 +2427,7 @@ function wp_new_comment_notify_postauthor( $comment_id ) {
24272427
$comment = get_comment( $comment_id );
24282428
$is_note = ( $comment && 'note' === $comment->comment_type );
24292429

2430-
$maybe_notify = $is_note ? get_option( 'wp_notes_notify' ) : get_option( 'comments_notify' );
2430+
$maybe_notify = $is_note ? get_option( 'wp_notes_notify', 1 ) : get_option( 'comments_notify' );
24312431

24322432
/**
24332433
* Filters whether to send the post author new comment notification emails,

0 commit comments

Comments
 (0)