WordPress:Template Tags/comment author email link

来自站长百科
跳转至: 导航、​ 搜索

描述[ ]

显示评论作者的电子邮件,作为一个mailto 链接。如果讨论选项下面的"用户必须填写姓名和电子邮件地址"得到了激活,那么必须要提供一个电子邮件地址。必须在The Loop或者一个评论loop内,使用这个标签。

注: 不推荐你显示电子邮件地址,因为垃圾广告收集工具,会利用这个机会,从你的站点上截取你的电子邮件地址。

用法[ ]

%%% <?php comment_author_email_link('linktext', 'before', 'after'); ?> %%%

例子[ ]

默认用法[ ]

email: <?php comment_author_email_link(); ?><br />

链接文本和样式[ ]

显示评论作者的电子邮件链接作为文本字符串电子邮件评论作者并且在链接前后分别添加两个箭头,规定链接的格式。

<?php comment_author_email_link('Email Comment Author', ' > ', ' < '); ?>

参数[ ]

linktext
(string) 电子邮件链接的链接文本。默认文本是评论作者的电子邮件地址。
before
(string) 链接前面显示的文本。没有默认值。
after
(string)链接之后显示的文本。没有默认值。

相关的[ ]

comments_number, comments_link, comments_rss_link, comments_popup_script, comments_popup_link, comment_ID, comment_author, comment_author_IP, comment_author_email, comment_author_url, comment_author_email_link, comment_author_url_link, comment_author_link, comment_type, comment_text, comment_excerpt, comment_date, comment_time, comments_rss_link, comment_author_rss, comment_text_rss, comment_link_rss, permalink_comments_rss

模板:PHP 函数标签 页底文字