Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions wp-includes/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -2505,19 +2505,6 @@ function wp_new_comment_notify_postauthor( $comment_id ) {
return wp_notify_postauthor( $comment_id );
}

/**
* Send a notification to the post author when a new note is added via the REST API.
*
* @since 6.9.0
*
* @param WP_Comment $comment The comment object.
*/
function wp_new_comment_via_rest_notify_postauthor( $comment ) {
if ( $comment instanceof WP_Comment && 'note' === $comment->comment_type ) {
wp_new_comment_notify_postauthor( (int) $comment->comment_ID );
}
}

/**
* Sets the status of a comment.
*
Expand Down
1 change: 0 additions & 1 deletion wp-includes/default-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@
// Email notifications.
add_action( 'comment_post', 'wp_new_comment_notify_moderator' );
add_action( 'comment_post', 'wp_new_comment_notify_postauthor' );
add_action( 'rest_insert_comment', 'wp_new_comment_via_rest_notify_postauthor' );
add_action( 'after_password_reset', 'wp_password_change_notification' );
add_action( 'register_new_user', 'wp_send_new_user_notifications' );
add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );
Expand Down
4 changes: 0 additions & 4 deletions wp-includes/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,6 @@ function create_initial_rest_routes() {
$controller = new WP_REST_Application_Passwords_Controller();
$controller->register_routes();

// Comments.
$controller = new WP_REST_Comments_Controller();
$controller->register_routes();

$search_handlers = array(
new WP_REST_Post_Search_Handler(),
new WP_REST_Term_Search_Handler(),
Expand Down
Loading