get_comment_text

过滤器::过滤注释的文本。

apply_filters( ‘get_comment_text’, string $comment_content , WP_Comment $comment , array $args )

说明(Description)

另见函数 Walker_Comment::comment()()


参数(Parameters)

参数类型说明
$comment_content(string)评论的文本。
$comment(WP_Comment)注释对象。
$args(array)一组参数。

源码(Source)

/**
 * Retrieve the text of the current comment.
 *
 * @since 1.5.0
 *
 * @see Walker_Comment::comment()
 *
 * @param int   $comment_ID ID of the comment for which to get the text. Default current comment.
 * @param array $args       Optional. An array of arguments. Default empty.
 * @return string The comment content.
 */
function get_comment_text( $comment_ID = 0, $args = array() ) {
	$comment = get_comment( $comment_ID );
	/**
	 * Filter the text of a comment.
	 *
	 * @since 1.5.0
	 *
	 * @see Walker_Comment::comment()
	 *
	 * @param string $comment_content Text of the comment.
	 * @param object $comment         The comment object.
	 * @param array  $args            An array of arguments.
	 */
	return apply_filters( 'get_comment_text', $comment->comment_content, $comment, $args );
}
更新版本源码位置使用被使用
1.5.0wp-includes/comment-template.php:99210
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索