WP_Comments_List_Table::floated_admin_avatar() WordPress Method

The WP_Comments_List_Table::floated_admin_avatar() method is used to display the avatar for a comment author. The avatar is floated to the left of the comment author's name.

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

Adds avatars to comment author names.


Parameters

$name

(string)(Required)Comment author name.

$comment_id

(int)(Required)Comment ID.


Top ↑

Return

(string) Avatar with the user name.


Top ↑

Source

File: wp-admin/includes/class-wp-comments-list-table.php

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


Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.