Retrieves the author of the current post.
Parameters
$deprecated
stringoptional- Deprecated.
Default:
''
Source
function get_the_author( $deprecated = '' ) {
global $authordata;
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '2.1.0' );
}
/**
* Filters the display name of the current post's author.
*
* @since 2.9.0
*
* @param string $display_name The author's display name.
*/
return apply_filters( 'the_author', is_object( $authordata ) ? $authordata->display_name : '' );
}
Hooks
- apply_filters( ‘the_author’,
string $display_name ) Filters the display name of the current post’s author.
Grab the Author’s ‘Public’ Name
Grabs the value in the user’s Display name publicly as field.
https://developer.wordpress.org/reference/functions/get_the_author_meta/