函数原型
get_author_link( bool $display, int $author_id, string $author_nicename = ” ): string|null
函数描述
Returns or Prints link to the author’s posts.
是否弃用
Warning: This function has been deprecated. Use get_author_posts_url() instead.
函数参数
-
$display
bool
Required -
$author_id
int
Required -
$author_nicename
string
Optional Default:
''
函数返回值
string|null
函数位置
File: wp-includes/deprecated.php.
函数源码
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;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.1.0 | Use get_author_posts_url() |
| 1.2.0 | Introduced. |

