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/