Skip to content

Commit 6799a1d

Browse files
phpcbf
1 parent 8ec209c commit 6799a1d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/wp-includes/default-filters.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,14 @@
522522
// Email notifications.
523523
add_action( 'comment_post', 'wp_new_comment_notify_moderator' );
524524
add_action( 'comment_post', 'wp_new_comment_notify_postauthor' );
525-
add_action( 'rest_insert_comment', function( $comment ) {
526-
if ( 'note' === $comment->comment_type ) {
527-
wp_new_comment_notify_postauthor( $comment->comment_ID );
525+
add_action(
526+
'rest_insert_comment',
527+
function ( $comment ) {
528+
if ( 'note' === $comment->comment_type ) {
529+
wp_new_comment_notify_postauthor( $comment->comment_ID );
530+
}
528531
}
529-
} );
532+
);
530533
add_action( 'after_password_reset', 'wp_password_change_notification' );
531534
add_action( 'register_new_user', 'wp_send_new_user_notifications' );
532535
add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );

src/wp-includes/pluggable.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,8 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
19391939
$notify_message .= sprintf( __( 'Permalink: %s' ), get_comment_link( $comment ) ) . "\r\n";
19401940
}
19411941

1942+
error_log( $subject );
1943+
19421944
if ( 'note' !== $comment->comment_type && user_can( $post->post_author, 'edit_comment', $comment->comment_ID ) ) {
19431945
if ( EMPTY_TRASH_DAYS ) {
19441946
/* translators: Comment moderation. %s: Comment action URL. */

0 commit comments

Comments
 (0)