WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp trash post comments

Description

Moves comments for a post to the trash

Usage

 <?php wp_trash_post_comments$post_id ); ?>

Parameters

$post_id
(integer) (optional) Post ID.
Default: 0

Return Values

(mixed) 
False on failure.

Notes

Change Log

Since: 2.9.0

Source File

wp_trash_post_comments() is located in wp-includes/post.php.

Related

wp_untrash_post_comments(), wp_trash_post(), wp_delete_post(), clean_comment_cache()

See also index of Function Reference and index of Template Tags.