Commit b7dd09f6ef for wordpress.org

commit b7dd09f6ef1880f922b26c467160e0bc2b48bdc8
Author: ramonopoly <ramonopoly@git.wordpress.org>
Date:   Thu Oct 29 23:42:58 2026 +0000

    Comments: Use the note permission check when deleting reactions

    Deleting a reaction through `/wp/v2/comments` now uses the same permission check as the note it belongs to: edit access (`edit_comment`) to the note's post.

    Follow-up to r64488.

    Props kirasong, adamsilverstein, sadmansakibnadvi, talldan.

    Fixes #66406.


    Built from https://develop.svn.wordpress.org/trunk@65038


    git-svn-id: http://core.svn.wordpress.org/trunk@64188 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
index 523ef5e786..1d035d3a6e 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
@@ -2437,10 +2437,10 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
 		}

 		/*
-		 * Notes are editorial content, so require edit access to the note's post
-		 * rather than the moderate_comments capability.
+		 * Notes and their reactions are editorial content, so require edit access
+		 * to the note's post rather than the moderate_comments capability.
 		 */
-		if ( 'note' === strtolower( $comment->comment_type ) ) {
+		if ( in_array( strtolower( $comment->comment_type ), array( 'note', 'reaction' ), true ) ) {
 			return current_user_can( 'edit_comment', $comment->comment_ID );
 		}

diff --git a/wp-includes/version.php b/wp-includes/version.php
index 97166e1ae1..cfcfeba19e 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.2-beta3-65037';
+$wp_version = '7.2-beta3-65038';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.