is_avatar_comment_type

函数


is_avatar_comment_type ( $comment_type )
参数
  • (string)
    $comment_type
    Comment type to check.
    Required:
返回值
  • (bool) Whether the comment type is allowed for retrieving avatars.
定义位置
  • wp-includes/link-template.php
    , line 4213
引入
5.1.0
弃用

检查该评论类型是否允许检索头像。

function is_avatar_comment_type( $comment_type ) {
	/**
	 * Filters the list of allowed comment types for retrieving avatars.
	 *
	 * @since 3.0.0
	 *
	 * @param array $types An array of content types. Default only contains 'comment'.
	 */
	$allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) );

	return in_array( $comment_type, (array) $allowed_comment_types, true );
}