rest_after_insert_comment

动作钩子


do_action( 'rest_after_insert_comment', $comment, $request, true )
参数
  • (WP_Comment)
    $comment
    Inserted or updated comment object.
    Required:
  • (WP_REST_Request)
    $request
    Request object.
    Required:
  • (bool)
    $creating
    True when creating a comment, false
    when updating.
    Required:
定义位置
  • wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
    , line 758
引入
5.0.0
弃用

在通过REST API创建或更新评论后完全启动。

do_action( 'rest_after_insert_comment', $comment, $request, true );