Update a comment
update_commentUpdate comment content, author details, or moderation status. Approve to publish, mark as spam, or trash recoverably to manage your WordPress site.
Instructions
Update a comment's text, author details or moderation status. Setting status to "approve" publishes a held comment; "spam" trains the spam filter; "trash" hides it recoverably.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The comment ID. | |
| date | No | ISO 8601 date. | |
| parent | No | Parent ID, or 0 for none. | |
| status | No | Moderation status. | |
| content | No | The body text. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| author_url | No | Commenter website URL. | |
| author_name | No | Commenter display name. | |
| author_email | No | Commenter email address. |