mirror of
https://gh.wpcy.net/https://github.com/wp-cli/handbook.git
synced 2026-04-25 19:08:11 +08:00
648 B
648 B
wp comment
Creates, updates, deletes, and moderates comments.
EXAMPLES
# Create a new comment.
$ wp comment create --comment_post_ID=15 --comment_content="hello blog" --comment_author="wp-cli"
Success: Created comment 932.
# Update an existing comment.
$ wp comment update 123 --comment_author='That Guy'
Success: Updated comment 123.
# Delete an existing comment.
$ wp comment delete 1337 --force
Success: Deleted comment 1337.
# Trash all spam comments.
$ wp comment delete $(wp comment list --status=spam --format=ids)
Success: Trashed comment 264.
Success: Trashed comment 262.