pre_comment_approved

过滤钩子


apply_filters( 'pre_comment_approved', $approved, $commentdata )
参数
  • (int|string|WP_Error)
    $approved
    The approval status. Accepts 1, 0, ‘spam’, ‘trash’,
    or WP_Error.
    Required:
  • (array)
    $commentdata
    Comment data.
    Required:
定义位置
  • wp-includes/comment.php
    , line 826
引入
4.9.0
弃用

Filters a comment’s approval status before it is set.

return apply_filters( 'pre_comment_approved', $approved, $commentdata );