wp_insert_comment

动作钩子


do_action( 'wp_insert_comment', $id, $comment )
参数
  • (int)
    $id
    The comment ID.
    Required:
  • (WP_Comment)
    $comment
    Comment object.
    Required:
定义位置
  • wp-includes/comment.php
    , line 2070
引入
2.8.0
弃用

Fires immediately after a comment is inserted into the database.

do_action( 'wp_insert_comment', $id, $comment );