wp_moderate_comment
Set a comment's moderation status to approved, hold, spam, or trash. Preview changes with dry-run, apply with allow_prod for production.
Instructions
Set one comment's moderation status: approved, hold, spam or trash.
Those four strings are WordPress's own vocabulary and anything else is refused
('approve' and 'APPROVED' are NOT accepted). 'approved' publishes the comment,
'hold' returns it to the moderation queue, 'spam' teaches the spam filters, 'trash'
removes it recoverably. comment_id comes from wp_list_comments. DEFAULTS TO
dry_run=true (returns a preview; writes nothing). Pass dry_run=false to apply - the
result is checked against the status the site reports back. Requires the REST
transport. Prod writes require allow_prod=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| dry_run | No | ||
| install | Yes | ||
| allow_prod | No | ||
| comment_id | Yes |