@@ -1894,6 +1894,20 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
18941894 $ subject = sprintf ( __ ( '[%1$s] Pingback: "%2$s" ' ), $ blogname , $ post ->post_title );
18951895 break ;
18961896
1897+ case 'note ' :
1898+ /* translators: %s: Post title. */
1899+ $ notify_message = sprintf ( __ ( 'New note on your post "%s" ' ), $ post ->post_title ) . "\r\n" ;
1900+ /* translators: 1: Note author's name, 2: Note author's IP address, 3: Note author's hostname. */
1901+ $ notify_message .= sprintf ( __ ( 'Author: %1$s (IP address: %2$s, %3$s) ' ), $ comment ->comment_author , $ comment ->comment_author_IP , $ comment_author_domain ) . "\r\n" ;
1902+ /* translators: %s: Note author email. */
1903+ $ notify_message .= sprintf ( __ ( 'Email: %s ' ), $ comment ->comment_author_email ) . "\r\n" ;
1904+ /* translators: %s: Note text. */
1905+ $ notify_message .= sprintf ( __ ( 'Note: %s ' ), "\r\n" . $ comment_content ) . "\r\n\r\n" ;
1906+ $ notify_message .= __ ( 'You can see all notes on this post here: ' ) . "\r\n" ;
1907+ /* translators: Note notification email subject. 1: Site title, 2: Post title. */
1908+ $ subject = sprintf ( __ ( '[%1$s] Note: "%2$s" ' ), $ blogname , $ post ->post_title );
1909+ break ;
1910+
18971911 default : // Comments.
18981912 /* translators: %s: Post title. */
18991913 $ notify_message = sprintf ( __ ( 'New comment on your post "%s" ' ), $ post ->post_title ) . "\r\n" ;
@@ -1917,11 +1931,15 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
19171931 break ;
19181932 }
19191933
1920- $ notify_message .= get_permalink ( $ comment ->comment_post_ID ) . "#comments \r\n\r\n" ;
19211934 /* translators: %s: Comment URL. */
1922- $ notify_message .= sprintf ( __ ( 'Permalink: %s ' ), get_comment_link ( $ comment ) ) . "\r\n" ;
1935+ if ( 'note ' === $ comment ->comment_type ) {
1936+ $ notify_message .= admin_url ( "post.php?post= {$ comment ->comment_post_ID }" ) . "\r\n" ;
1937+ } else {
1938+ $ notify_message .= get_permalink ( $ comment ->comment_post_ID ) . "#comments \r\n\r\n" ;
1939+ $ notify_message .= sprintf ( __ ( 'Permalink: %s ' ), get_comment_link ( $ comment ) ) . "\r\n" ;
1940+ }
19231941
1924- if ( user_can ( $ post ->post_author , 'edit_comment ' , $ comment ->comment_ID ) ) {
1942+ if ( ' note ' !== $ comment -> comment_type && user_can ( $ post ->post_author , 'edit_comment ' , $ comment ->comment_ID ) ) {
19251943 if ( EMPTY_TRASH_DAYS ) {
19261944 /* translators: Comment moderation. %s: Comment action URL. */
19271945 $ notify_message .= sprintf ( __ ( 'Trash it: %s ' ), admin_url ( "comment.php?action=trash&c= {$ comment ->comment_ID }#wpbody-content " ) ) . "\r\n" ;
0 commit comments