get_the_author() WP 1.0
Retrieve the author of the current post.
Basis of: get_the_author_posts_link(), the_author()
Hooks from the function
Return
String/null. The author's display name.
Usage
get_the_author( $deprecated );
- $deprecated(string)
- Deprecated.
Default: ''
Notes
- Global. WP_User. $authordata The current author's data.
Changelog
Since 1.5.0 | Introduced. |
Code of get_the_author() get the author WP 5.6
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|null $display_name The author's display name.
*/
return apply_filters( 'the_author', is_object( $authordata ) ? $authordata->display_name : null );
}Related Functions
From tag: WP Loop
More from category: Other
- auth_redirect()
- count_many_users_posts()
- count_user_posts()
- count_users()
- email_exists()
- get_author_posts_url()
- get_current_user_id()
- get_editable_roles()
- get_the_author_posts_link()