Warning: Trying to access array offset on false in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 216
get_the_author() - 检索当前文章的作者 - WordPress函数 - WordPress动力
当前浏览:首页 / WordPress函数 / get_the_author()

get_the_author( string $deprecated = '' )

检索当前文章的作者


Warning: Undefined array key -1 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 185

Warning: Undefined array key 3 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 186

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "650ae00d9c1fad3fccc0887ab9025dcf" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "da3fa25e51008d111052e4f7cd1619a4" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

author 作者more...

themore...


参数

$deprecated

(string) (可选) 已弃用

默认值: ''


返回

(string|null) 作者的显示名称。



源码

查看源码 官方文档


更新日志

版本描述
1.5.0开始引入

使用示例

  • 示例1

    获取作者的“Public”名称
    将用户显示名称中的值作为字段公开获取。

    <?php $author = get_the_author(); ?>