get_the_author()
最后更新于:2021-11-27 01:03:00
get_the_author( string$deprecated=”)Retrieve the author of the current post.
参数
- $deprecated
-
(string) (Optional) Deprecated.
Default value: ”
响应
(string|null) The author’s display name.
源文件
文件: gc-includes/author-template.php
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 );
}