1. 首页
  2. WordPress钩子手册

comment_{$old_status}_to_{$new_status}

do_action( “comment_{$old_status}_to_{$new_status}”, WP_Comment $comment )

动作钩子::当注释状态从一个特定状态转换到另一个状态时激发。
Action Hook: Fires when the comment status is in transition from one specific status to another.

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


说明(Description)

hook name、$old_status和$new_status的动态部分分别引用旧的和新的注释状态。


参数(Parameters)

参数 类型 说明
$comment (WP_Comment) 注释对象。

源码(Source)


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

comment_{$old_status}_to_{$new_status} 为WP2原创文章,链接:https://www.wp2.cn/hook/comment_old_status_to_new_status/