floated_admin_avatar() WordPress Function

The floated_admin_avatar() function displays the administrator's avatar image in a floated container on the left side of the page. This can be useful for displaying the administrator's profile picture on the front end of a website.

floated_admin_avatar( string $name ) #

Adds avatars to relevant places in admin.


Parameters

$name

(string)(Required)User name.


Top ↑

Return

(string) Avatar with the user name.


Top ↑

Source

File: wp-admin/includes/comment.php

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


Top ↑

Changelog

Changelog
VersionDescription
2.5.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.