transition_comment_status

动作钩子
do_action( 'transition_comment_status', $new_status, $old_status, $comment )
参数
  • (int|string) $new_status The new comment status.
    Required:
  • (int|string) $old_status The old comment status.
    Required:
  • (WP_Comment) $comment Comment object.
    Required:
定义位置
相关勾子
wp_set_comment_statusget_default_comment_statusrest_comment_trashabletrash_commentatom_comments_ns
相关方法
wp_transition_comment_status_transition_post_statuswp_transition_post_statuswp_set_comment_statusget_default_comment_statusget_comment_statuses
引入
2.7.0
弃用
-

transition_comment_status – 这是一个WordPress动作,当评论的状态发生变化时被触发。transition_comment_status动作是在评论状态改变后才触发的,可以用来执行额外的动作,如发送电子邮件通知或更新其他数据。

当评论状态处于过渡期时触发。

do_action( 'transition_comment_status', $new_status, $old_status, $comment );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 11:36:30

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: