Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_delete_comment()

3 tags 1 category

wp_delete_comment() — Trashes or deletes a comment. The comment is moved to Trash instead of permanently deleted unless Trash is disabled, item is already in the Trash, or $force_delete is true. The post comment count will be updated if the comment was approved and has a post ID available.

Inputs: $comment_id (int|WP_Comment): Comment ID or WP_Comment object. $force_delete (bool): Whether to bypass Trash and force deletion. Default false.

Returns bool: True on success, false on failure.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…