Check if this comment type allows avatars to be retrieved.
$comment_typestringrequired
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 );
}
Filters the list of allowed comment types for retrieving avatars.
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_avatar_comment_type