WordPress开发者和主题制作者的搜索引擎



rest_preprocess_comment ›

Since4.7.0
已弃用n/a
apply_filters( 'rest_preprocess_comment', $prepared_comment, $request )
参数: (2)
  • (array) $prepared_comment The prepared comment data for `wp_insert_comment`.
    Required: Yes
  • (WP_REST_Request) $request The current request.
    Required: Yes
定义在:
文档:

Filters a comment after it is prepared for the database.

Allows modification of the comment right after it is prepared for the database.





源码

return apply_filters( 'rest_preprocess_comment', $prepared_comment, $request );