Repository navigation
Closed
Labels
[Type] EnhancementNew feature or request
Description
Split out from #40, as requested there on 2026-07-16.
What problem does this address?
Comments are the third resource the 7.2 roadmap names for read-only coverage, and the plugin already has a consumer waiting for it: the Suggest Reply feature (#508) reads comments through its own code path rather than an ability. A core/read-comments ability gives Suggest Reply, the AI Workspace, and MCP clients one permission-checked way to fetch a comment or a thread.
Proposal
- Name:
core/comments-query - Category:
content - Input:
id(single comment) or list arguments:post,parent(thread),status(approveby default;hold,spam,trash,allgated bymoderate_comments),type,author,author_email(gated),search,after/before,per_page,page,orderby,order. Returnstotalandtotal_pages. - Output per item: id, post id, parent, author display name, author id when present, date, content (rendered and raw for moderators only), status, type, link, and registered
show_in_restmeta. Author email and IP only for users withmoderate_comments, matching REST's context handling. - Permission: mirror
WP_REST_Comments_Controller: approved comments on readable posts for anyone who can read the post; anything unapproved, or any private field, requiresmoderate_comments/edit_comment. - Annotations:
readonly: true,idempotent: true,destructive: false.
Out of scope: replying, approving, or deleting (core/manage-comments, separate issue). Suggest Reply keeps its current path until this lands; migrating it is a follow-up.
Acceptance
- Tests for: approved-only default,
status=holddenied to a subscriber and allowed to an editor, private fields stripped for non-moderators, thread fetch byparent, comments on a private post hidden, pagination totals. - Abilities Explorer and MCP Adapter exposure verified.
- WordPress Core Abilities #40 checklist updated.
Path to core
Prototype here; Trac ticket after the shape settles.
Reacted by Ankit Kumar Shah and Prasad Karmalkar
Metadata
Metadata
Assignees
Labels
[Type] EnhancementNew feature or request
Type
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsDone
Activity
[-]Add a core/read-comments ability[/-][+]Add a core/comments-query ability[/+][-]Add a core/comments-query ability[/-][+]Add a `core/comments-query` ability[/+]gziolo commentedon Oct 1, 2026
I’ve updated the title and description to reflect yesterday’s Core AI chat and the direction @jorgefilipecosta shared in the draft proposal. We’re aligning the names of read-only abilities that query collections around
core/$collection-query, so this ability becomescore/comments-query.theaminulai commentedon Oct 3, 2026
Hi @jorgefilipecosta — I saw this got assigned to you, but I'd already started on it and have the single-comment-by-ID lookup mode implemented and open as #1100. Apologies for any overlap this causes!
Whenever you have a chance, I'd really appreciate your review on #1100 — happy to adjust the approach if it doesn't match the direction you had in mind from the draft proposal.
gziolo commentedon Nov 19, 2026
@nikmclaughlin or @jorgefilipecosta, let's close it now that work moved to WordPress/abilities#17. Instead, we will have to open a ticket in WordPress Trac. I don't see it listed there when looking at https://core.trac.wordpress.org/query?component=Abilities+API&status=!closed.