Skip to content

Commit 887974e

Browse files
Empty notes are resolution/reopen events
1 parent 099de2f commit 887974e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/wp-includes/pluggable.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,11 +1746,6 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
17461746
return false;
17471747
}
17481748

1749-
// Skip notifications for empty notes.
1750-
if ( 'note' === $comment->comment_type && empty( $comment->comment_content ) ) {
1751-
return false;
1752-
}
1753-
17541749
$post = get_post( $comment->comment_post_ID );
17551750
$author = get_userdata( $post->post_author );
17561751

@@ -1907,7 +1902,7 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
19071902
/* translators: %s: Note author email. */
19081903
$notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
19091904
/* translators: %s: Note text. */
1910-
$notify_message .= sprintf( __( 'Note: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
1905+
$notify_message .= sprintf( __( 'Note: %s' ), "\r\n" . ( empty( $comment_content ) ? __( 'resolved/reopened' ) : $comment_content ) ) . "\r\n\r\n";
19111906
$notify_message .= __( 'You can see all notes on this post here:' ) . "\r\n";
19121907
/* translators: Note notification email subject. 1: Site title, 2: Post title. */
19131908
$subject = sprintf( __( '[%1$s] Note: "%2$s"' ), $blogname, $post->post_title );

0 commit comments

Comments
 (0)