You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 (approve by default; hold, spam, trash, all gated by moderate_comments), type, author, author_email (gated), search, after/before, per_page, page, orderby, order. Returns total and total_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_rest meta. Author email and IP only for users with moderate_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, requires moderate_comments/edit_comment.
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=hold denied to a subscriber and allowed to an editor, private fields stripped for non-moderators, thread fetch by parent, comments on a private post hidden, pagination totals.
Abilities Explorer and MCP Adapter exposure verified.
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 becomes core/comments-query.
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.
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-commentsability gives Suggest Reply, the AI Workspace, and MCP clients one permission-checked way to fetch a comment or a thread.Proposal
core/comments-querycontentid(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.show_in_restmeta. Author email and IP only for users withmoderate_comments, matching REST's context handling.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.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
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.Path to core
Prototype here; Trac ticket after the shape settles.