get_author_name

函式
get_author_name ( $auth_id = false )
引數
  • (int) $auth_id The ID of the author.
    Required:
    Default: false
返回值
  • (string) The author's display name.
相關
  • get_the_author_meta()
定義位置
相關方法
get_cat_nameget_author_linkget_the_author_lastnameget_the_author_aimget_the_author_nickname
引入
1.0.0
棄用
2.8.0

get_author_name: 此函式返回給定作者的顯示名稱。

檢索指定作者的首選顯示名稱。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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);
}
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); }
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);
}

常見問題

FAQs
檢視更多 >