Warning: This function has been deprecated. Use get_the_author_meta() instead.

get_profile() WordPress Function

The get_profile() function is used to retrieve the user profile information for a given user. This function can be used to get the user's display name, email address, website URL, and so on.

get_profile( string $field, false|int $user = false ) #

Retrieve user data based on field.


Description

Top ↑

See also


Top ↑

Parameters

$field

(string)(Required)User meta field.

$user

(false|int)(Optional) User ID to retrieve the field for. Default false (current user).

Default value: false


Top ↑

Return

(string) The author's field from the current author's DB object.


Top ↑

Source

File: wp-includes/deprecated.php

function get_profile( $field, $user = false ) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'get_the_author_meta()' );
	if ( $user ) {
		$user = get_user_by( 'login', $user );
		$user = $user->ID;
	}
	return get_the_author_meta( $field, $user );
}


Top ↑

Changelog

Changelog
VersionDescription
3.0.0Use get_the_author_meta()
1.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.

Show More