# is_avatar_comment_type()

URL: https://chugunov.pro/api-wordpress/functions/is_avatar_comment_type/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 5.1.0.

## Сигнатура

```php
is_avatar_comment_type( string $comment_type ): bool
```

## Описание

Проверяет, разрешает ли этот тип комментария получение аватаров.

## Параметры

- `$comment_type` `string` — обязательный. Тип комментария для проверки.

## Возвращаемое значение

`bool`

## Исходный код

Файл: `wp-includes/link-template.php:4345`

```php
function is_avatar_comment_type( $comment_type ) {
	/**
	 * Filters the list of allowed comment types for retrieving avatars.
	 *
	 * @since 3.0.0
	 *
	 * @since 6.9.0 The 'note' comment type was added.
	 *
	 * @param array $types An array of content types. Default contains 'comment' and 'note'.
	 */
	$allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment', 'note' ) );

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

## История изменений

- 5.1.0 — Introduced.

## Связанные

Использует: [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: [`get_avatar_data`](https://chugunov.pro/api-wordpress/functions/get_avatar_data/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/is_avatar_comment_type/
