This function has been deprecated. Use get_the_author_meta() instead.
Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789
Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794
Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789
Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794
Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789
get_profile( string $field, false|int $user = false )
Retrieve user data based on field.
Description
See also
Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789
Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794
Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789
Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794
Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789
Parameters
- $field
-
(Required) User meta field.
- $user
-
(Optional) User ID to retrieve the field for. Default false (current user).
Default value: false
Return
(string) The author's field from the current author's DB object.
Source
File: wp-includes/deprecated.php
function get_profile( $field, $user = false ) {
_deprecated_function( __FUNCTION__, 'WP-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 );
}
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Use get_the_author_meta() |
| 1.5.0 | Introduced. This function has been deprecated. Use get_the_author_meta() instead. |