参数
- $linktext
-
(string)(可选) 显示文本,而不是评论作者的电子邮件地址。
默认值: ''
- $before
-
(string)(可选) 要在电子邮件链接之前显示的文本或HTML。
默认值: ''
- $after
-
(string)(可选) 在电子邮件链接后显示的文本或HTML。
默认值: ''
- $comment
-
(int|WP_Comment)(可选) 评论ID或WP_Comment对象。默认值为当前评论。
源码
更新日志
版本 | 描述 |
---|---|
4.6.0 | 添加了$comment 参数。 |
0.71 | 开始引入 |
使用示例
默认用法
web site: <?php comment_author_url_link(); ?><br />
链接文本和样式
将评论作者的URL显示为文本字符串“访问评论作者的网站”,并在链接前后添加项目符号以设置其样式。
<?php comment_author_url_link('Visit Site of Comment Author', ' • ', ' • '); ?>
• Visit Site of Comment Author •