Walker_Comment::filter_comment_text()

最后更新于:2021-11-26 06:19:21

Walker_Comment::filter_comment_text( string$comment_text, GC_Comment|null$comment)

Filters the comment text.

参数

$comment_text

(string) (Required) Text of the current comment.

$comment

(GC_Comment|null) (Required) The comment object. Null if not found.

响应

(string) Filtered text of the current comment.

源文件

文件: gc-includes/class-walker-comment.php

	public function filter_comment_text( $comment_text, $comment ) {
		$commenter          = gc_get_current_commenter();
		$show_pending_links = ! empty( $commenter['comment_author'] );

		if ( $comment && '0' == $comment->comment_approved && ! $show_pending_links ) {
			$comment_text = gc_kses( $comment_text, array() );
		}

		return $comment_text;
	}