Warning: Trying to access array offset on false in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 216
comment_author_url_link() - 显示当前评论作者的URL的HTML链接 - WordPress函数 - WordPress动力
当前浏览:首页 / WordPress函数 / comment_author_url_link()

comment_author_url_link( string $linktext = '', string $before = '', string $after = '', int|WP_Comment $comment )

显示当前评论作者的URL的HTML链接


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 4 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 "8a120dc4a793b62501729a9a51316687" 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 "3743f043ec003c5dec15b1f60f641527" 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 "05a767e1e80b3fbcaa4313c042c82dd3" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

author 作者more...

comment 评论more...

linkmore...

urlmore...


参数

$linktext

(string)(可选) 显示文本,而不是评论作者的电子邮件地址。

默认值: ''

$before

(string)(可选) 要在电子邮件链接之前显示的文本或HTML。

默认值: ''

$after

(string)(可选) 在电子邮件链接后显示的文本或HTML。

默认值: ''

$comment

(int|WP_Comment)(可选) 评论ID或WP_Comment对象。默认值为当前评论。



源码

查看源码 官方文档


更新日志

版本描述
4.6.0添加了$comment参数。
0.71开始引入

使用示例

  • 示例1

    默认用法

    web site: <?php comment_author_url_link(); ?><br />
    
  • 示例2

    链接文本和样式

    将评论作者的URL显示为文本字符串“访问评论作者的网站”,并在链接前后添加项目符号以设置其样式。

    <?php comment_author_url_link('Visit Site of Comment Author', ' &bull; ', ' &bull; '); ?>
    

    • Visit Site of Comment Author •