Skip to content

Propose reader comment query, create, and update abilities - #37

Open
euvoor wants to merge 1 commit into
WordPress:add/core-shape-docfrom
euvoor:design/reader-comment-abilities
Open

euvoor wants to merge 1 commit into
WordPress:add/core-shape-docfrom
euvoor:design/reader-comment-abilities

Conversation

@euvoor

@euvoor euvoor commented Nov 27, 2026

Copy link
Copy Markdown

@gziolo, this adds the three reader-comment abilities to the design in #22, following the discussion in #17.

core/comments-query uses where.ids for a lookup and returns the same paginated collection for one comment or a thread, as you suggested in the earlier query review. core/comment-create posts a reply as the signed-in user and leaves the moderation decision to WordPress. core/comment-update changes the text of an approved or pending reader comment. Editorial notes and moderation actions stay outside this proposal.

One decision I'd like your view on is the pending queue. The proposal defaults to approved comments even for an ID lookup, and requires moderate_comments to query held comments. Someone who submits a reply can still see its status in the create response.

I checked the six schemas against the seven examples and exercised fourteen invalid inputs. On the existing comments REST endpoint, I tested a subscriber submitting a reply and an editor correcting it twice. The reply stayed pending with the same author and parent on WordPress 7.1.5 and the 7.2 RC3 checkout, on both single-site and multisite.

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: euvoor <euvoor@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant