get_author_link

函式
get_author_link ( $display, $author_id, $author_nicename = '' )
引數
  • (bool) $display
    Required:
  • (int) $author_id
    Required:
  • (string) $author_nicename Optional.
    Required:
    Default: (empty)
返回值
  • (string|null)
相關
  • get_author_posts_url()
定義位置
相關方法
get_the_author_linkget_author_rss_linkthe_author_linkget_author_feed_linkcomment_author_link
引入
1.2.0
棄用
2.1.0

get_author_link: 此函式返回一個給定作者的作者檔案頁的連結。

返回或列印到作者的文章的連結。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function get_author_link($display, $author_id, $author_nicename = '') {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );
$link = get_author_posts_url($author_id, $author_nicename);
if ( $display )
echo $link;
return $link;
}
function get_author_link($display, $author_id, $author_nicename = '') { _deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' ); $link = get_author_posts_url($author_id, $author_nicename); if ( $display ) echo $link; return $link; }
function get_author_link($display, $author_id, $author_nicename = '') {
	_deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );

	$link = get_author_posts_url($author_id, $author_nicename);

	if ( $display )
		echo $link;
	return $link;
}

常見問題

FAQs
檢視更多 >