WP_Comments_List_Table::floated_admin_avatar( string $name, int $comment_id ): string

In this article

Adds avatars to comment author names.

Parameters

$namestringrequired
Comment author name.
$comment_idintrequired
Comment ID.

Return

string Avatar with the user name.

Source

public function floated_admin_avatar( $name, $comment_id ) {
	$comment = get_comment( $comment_id );
	$avatar  = get_avatar( $comment, 32, 'mystery' );
	return "$avatar $name";
}

Changelog

VersionDescription
3.1.0Introduced.

User Contributed Notes

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