get_comment_type

过滤钩子


apply_filters( 'get_comment_type', $comment->comment_type, $comment->comment_ID, $comment )
参数
  • (string)
    $comment_type
    The type of comment, such as ‘comment’, ‘pingback’, or ‘trackback’.
    Required:
  • (string)
    $comment_ID
    The comment ID as a numeric string.
    Required:
  • (WP_Comment)
    $comment
    The comment object.
    Required:
定义位置
  • wp-includes/comment-template.php
    , line 1101
引入
4.1.0
弃用

过滤返回的评论类型。

return apply_filters( 'get_comment_type', $comment->comment_type, $comment->comment_ID, $comment );