检索指定作者的首选显示名称。
原型
get_author_name( int $auth_id = false )
参数
$auth_id
(int)
(Optional)
作者的ID。
返回值
(string)
作者的显示名称。
源文件
路径:wp-includes/deprecated.php
<?php
...
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);
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_author_name/