Title: is_avatar_comment_type
Published: February 22, 2019
Last modified: February 24, 2026

---

# is_avatar_comment_type( string $comment_type ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#wp--skip-link--target)

Check if this comment type allows avatars to be retrieved.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#parameters)󠁿

 `$comment_type`stringrequired

Comment type to check.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#return)󠁿

 bool Whether the comment type is allowed for retrieving avatars.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/link-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/link-template.php#L4345)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/link-template.php#L4345-L4358)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#hooks)󠁿

 [apply_filters( ‘get_avatar_comment_types’, array $types )](https://developer.wordpress.org/reference/hooks/get_avatar_comment_types/)

Filters the list of allowed comment types for retrieving avatars.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#related)󠁿

| Uses | Description | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

| Used by | Description | 
| [get_avatar_data()](https://developer.wordpress.org/reference/functions/get_avatar_data/)`wp-includes/link-template.php` |

Retrieves default data about the avatar.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/is_avatar_comment_type/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.1.0](https://developer.wordpress.org/reference/since/5.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_avatar_comment_type%2F)
before being able to contribute a note or feedback.