1. 首页
  2. WordPress钩子手册

comment_{$new_status}_{$comment->comment_type}

do_action( “comment_{$new_status}_{$comment->comment_type}”, int $comment_ID, WP_Comment $comment )

操作挂钩:当特定注释类型的状态处于转换状态时激发。
Action Hook: Fires when the status of a specific comment type is in transition.

目录锚点:#说明#参数#源码


说明(Description)

hook name、$new_status和$comment->comment_type的动态部分分别引用new comment status和comment type。


参数(Parameters)

参数 类型 说明
$comment_ID (int) 评论ID。
$comment (WP_Comment) 注释对象。

源码(Source)


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

comment_{$new_status}_{$comment->comment_type} 为WP2原创文章,链接:https://www.wp2.cn/hook/comment_new_status_comment-comment_type/