WPDev.one
Core Function
View Source on Trac ↗

wp_delete_comment()

wp_delete_comment( mixed $comment_id, mixed $force_delete = false )

Trashes or deletes a comment.

Parameters 1 required

Name / Type Description
(int

| WP_Comment) $comment_id Comment ID or WP_Comment object.

Required
$force_delete
bool

Whether to bypass Trash and force deletion. Default false.

Return Value

(bool)
True on success, false on failure.

Function Information

Since Version
2.0.0
Source File
wp-includes/comment.php
Advertisement