get_the_author_id

函式
get_the_author_id ( No parameters )
返回值
  • (string|int) The author's ID.
相關
  • get_the_author_meta()
定義位置
相關方法
get_the_author_icqget_the_author_aimget_the_author_yimget_the_authorget_the_author_link
引入
1.5.0
棄用
2.8.0

get_the_author_id: 這個函式檢索文章作者的ID。它不接受任何引數,返回一個整數值。

檢索當前文章作者的ID。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function get_the_author_ID() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta('ID')' );
return get_the_author_meta('ID');
}
function get_the_author_ID() { _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta('ID')' ); return get_the_author_meta('ID'); }
function get_the_author_ID() {
	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta('ID')' );
	return get_the_author_meta('ID');
}

常見問題

FAQs
檢視更多 >