rest_insert_comment
do_action( ‘rest_insert_comment’, WP_Comment $comment , WP_REST_Request $request , bool $creating )
动作钩子::通过REST API创建或更新注释后激发。Action Hook: Fires after a comment is created or updated via the REST API.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$comment | (WP_Comment) | 插入或更新的注释对象。 |
$request | (WP_REST_Request) | 请求对象。 |
$creating | (bool) | 创建注释时为True,更新时为false。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.7.0 | wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php:725 | 2 | 0 |
总计 0 评论