On this page
get_author_name( int $auth_id = false ): string
This function has been deprecated. Use get_the_author_meta() instead.
Retrieve the specified author’s preferred display name.
Description
See also
Parameters
$auth_idint Optional-
The ID of the author.
Default:
false
Return
string The author's display name.
Source
File: wp-includes/deprecated.php. View all references
function get_author_name( $auth_id = false ) {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'display_name\')' );
return get_the_author_meta('display_name', $auth_id);
}
Related
Uses
| Uses | Description |
|---|---|
| get_the_author_meta() wp-includes/author-template.php | Retrieves the requested data of the author of the current post. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Use get_the_author_meta() |
| 1.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_author_name