is_avatar_comment_type( string $comment_type )

Check if this comment type allows avatars to be retrieved.


Description Description


Parameters Parameters

$comment_type

(string) (Required) Comment type to check.


Top ↑

Return Return

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


Top ↑

Source Source

File: wp-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 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
5.1.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.