1. 首页
  2. WordPress钩子手册

delete_comment

do_action( ‘delete_comment’, int $comment_id, WP_Comment $comment )

动作钩子::在从数据库中删除注释之前立即激发。
Action Hook: Fires immediately before a comment is deleted from the database.

目录锚点:#参数#源码


参数(Parameters)

参数 类型 说明
$comment_id (int) 评论ID。
$comment (WP_Comment) 要删除的评论。

源码(Source)


更新版本 源码位置 使用 被使用
4.9.0 wp-includes/comment.php:1401 1 0

delete_comment 为WP2原创文章,链接:https://www.wp2.cn/hook/delete_comment/