[wp-trac] [WordPress Trac] #64049: REST API: Updating comment via REST does not respect allow_empty_comment filter
WordPress Trac
noreply at wordpress.org
Mon Sep 29 15:10:56 UTC 2025
#64049: REST API: Updating comment via REST does not respect allow_empty_comment
filter
--------------------------+-----------------------------
Reporter: kadamwhite | Owner: kadamwhite
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Keywords:
Focuses: rest-api |
--------------------------+-----------------------------
When updating a comment via the REST API we currently fail comment updates
in the `WP_REST_Comments_Controller::update_item` method if the updated
content is `empty()`. On REST comment creation and within traditional
comment updates via `wp_handle_comment_submission` we respect the return
value of the `allow_empty_comment` filter and permit empty comment content
when this filter is set.
My understanding of the history here is that allowing empty comments
permits moderation by allowing inappropriate comment content to be deleted
without removing the content entity itself; or alternatively (and as
discussed in #43177) to permit comments to be saved which only contain
metadata and do not have any "content" in the traditional sense.
This may also unblock certain actions for editorial comments within the
block editor.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64049>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list