feat: add moderation metadata fields to comments REST API endpoint#12
feat: add moderation metadata fields to comments REST API endpoint#12xavierandueza wants to merge 1 commit into
Conversation
Add priority, editorial_note, and word_count fields to the wp/v2/comments endpoint. Priority and editorial_note are stored as comment meta and accepted as input on create/update. Word count is a computed read-only field derived from comment content.
|
📚 Documentation update workflow has been queued for reopened PR (Job ID: |
📊 PR Analysis SummaryFiles Changed: 1 file(s) Changed Files
Relevant Documentation PagesDocs impacted by this PR
✅ Documentation Changes Applied
This analysis was automatically generated by the ReadMe AI Documentation Bot. |
📚 Documentation Changes Applied
|
|
📚 No documentation updates were needed for this PR. |
📚 Documentation Changes Applied
|
📚 Documentation Changes Applied
|
📚 Documentation Changes Applied
|
|
📚 Analyzing PR for documentation updates... |
|
Documentation Changes Added
Actions
|
|
Documentation Changes Added
Actions
|
|
Documentation Changes Added
Actions
|
|
Documentation Changes Added
Actions
|
|
Documentation Changes Added
Actions
|
|
Documentation Changes Added
Actions
|
|
Documentation Changes Added
Actions
|
|
Documentation Changes Added
Actions
If neither actions are selected, on PR close/merge the docs branch in ReadMe will remain open. |
|
Documentation Changes Added
Actions
If neither actions are selected, on PR close/merge the docs branch in ReadMe will remain open. |
|
You can re-trigger by converting this PR to draft, then opening for review again. |
|
Documentation Changes Added
Actions
If neither actions are selected, on PR close/merge the docs branch in ReadMe will remain open. |
Summary
priorityfield (enum:low,normal,high,urgent) to the comments endpoint for moderation triage, stored as comment metaeditorial_notestring field for internal moderator notes, visible only ineditcontextword_countread-only field to comment responsesPOST /wp/v2/comments) and update (POST /wp/v2/comments/{id}) pathssanitize_keyandsanitize_textarea_fieldChanges
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.phpget_item_schema(): Added schema definitions for the three new propertiescreate_item(): Savespriorityandeditorial_noteas comment meta on creationupdate_item(): Savespriorityandeditorial_noteas comment meta on updateprepare_item_for_response(): Reads and returns all three new fields in API responses