is_avatar_comment_type()

最后更新于:2021-11-27 08:17:10

is_avatar_comment_type( string$comment_type)

Check if this comment type allows avatars to be retrieved.

参数

$comment_type

(string) (Required) Comment type to check.

响应

(bool) Whether the comment type is allowed for retrieving avatars.

源文件

文件: gc-includes/link-template.php

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 );
}