Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #62066


Ignore:
Timestamp:
09/18/2024 12:58:17 AM (20 months ago)
Author:
sabernhardt
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #62066

    • Property Keywords changes-requested removed
    • Property Focuses rest-api added
    • Property Component changed from Posts, Post Types to Comments
  • Ticket #62066 – Description

    initial v1  
    1 When I was viewing [this](https://core.trac.wordpress.org/ticket/61244) ticket, I originally misinterpreted the issue. I thought that the user wanted to avoid exporting comments that have no content, but I realized that isn't actually allowed through the WordPress editor.
     1When I was viewing ticket #61244, I originally misinterpreted the issue. I thought that the user wanted to avoid exporting comments that have no content, but I realized that isn't actually allowed through the WordPress editor.
    22
    33However, I was trying to recreate the empty comment issue, and realized that users are able to edit comments to be empty.
    44
    5 I did some initial digging and [this file](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php#L424) has a create_item that contains this check:
    6 
     5I did some initial digging and [https://github.com/WordPress/wordpress-develop/blob/5d0753bb6e7c29adc8e6171ee21338cb5ade297b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php#L568 WP_REST_Comments_Controller] has a `create_item` that contains this check:
    76
    87{{{
     
    1716}}}
    1817
    19 and an update_item() function. I think that adding this or something similar to the the update_item function would resolve this issue.
    20 
     18and an `update_item()` function. I think that adding this or something similar to the `update_item` function would resolve this issue.