WordPress: Template Tags/comment author email link:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: == Description == Displays the comment author's email address, as a mailto link. An email address must be provided if "User must fill out name and email" is enabled under [[WordPress:Dis...)
 
无编辑摘要
第1行: 第1行:
== Description ==
== Description ==
== 描述 ==


Displays the comment author's email address, as a mailto link. An email address must be provided if "User must fill out name and email" is enabled under [[WordPress:Discussion_Options#Before_a_comment_appears:|Discussion Options]]. This tag must be within [[WordPress:The Loop]], or a comment loop.
Displays the comment author's email address, as a mailto link. An email address must be provided if "User must fill out name and email" is enabled under [[WordPress:Discussion_Options#Before_a_comment_appears:|Discussion Options]]. This tag must be within [[WordPress:The Loop]], or a comment loop.
显示评论作者的电子邮件,作为一个mailto 链接。如果[[WordPress:Discussion_Options#Before_a_comment_appears:|讨论选项]]下面的"用户必须填写姓名和电子邮件地址"得到了激活,那么必须要提供一个电子邮件地址。必须在[[WordPress:The Loop|The Loop]]或者一个评论loop内,使用这个标签。


'''Note:''' Displaying email addresses is not recommended, as it provides spam collection tools the opportunity to cull them from your site.  
'''Note:''' Displaying email addresses is not recommended, as it provides spam collection tools the opportunity to cull them from your site.  


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


第14行: 第19行:


  email: <?php comment_author_email_link(); ?>&lt;br /&gt;
  email: <?php comment_author_email_link(); ?>&lt;br /&gt;
== 用法 ==
%%% <?php comment_author_email_link('linktext', 'before', 'after'); ?> %%%
== 例子 ==
===默认用法===
电子邮件: <?php 评论_作者_电子邮件_链接(); ?>&lt;br /&gt;


===Link Text and Styling===
===Link Text and Styling===
===链接文本和样式===


Displays comment author's email link as text string '''Email Comment Author''' and adds arrows before  and after the link to style it.
Displays comment author's email link as text string '''Email Comment Author''' and adds arrows before  and after the link to style it.
显示评论作者的电子邮件链接作为文本字符串'''电子邮件评论作者'''并且在链接前后分别添加两个箭头,规定链接的格式。


<pre><?php comment_author_email_link('Email Comment Author', ' > ', ' < '); ?></pre>
<pre><?php comment_author_email_link('Email Comment Author', ' > ', ' < '); ?></pre>
<pre><?php 评论_作者_电子邮件_链接('电子邮件评论作者', ' > ', ' < '); ?></pre>


<div style="border:1px solid blue; width:50%; padding:10px"> > [[WordPress:#Link_Text_and_Styling|Email Comment Author]] < </div>
<div style="border:1px solid blue; width:50%; padding:10px"> > [[WordPress:#Link_Text_and_Styling|Email Comment Author]] < </div>
<div style="border:1px solid blue; width:50%; padding:10px"> > [[WordPress:#Link_Text_and_Styling|电子邮件评论作者]] < </div>


== Parameters ==
== Parameters ==
== 参数 ==


; linktext : (''string'') Link text for the email link. Default is the comment author's email address.   
; linktext : (''string'') Link text for the email link. Default is the comment author's email address.   
第29行: 第56行:
; after : (''string'') Text to display after the link. There is no default.
; after : (''string'') Text to display after the link. There is no default.


; 链接文本 : (''string'') 电子邮件链接的链接文本。默认文本是评论作者的电子邮件地址。
; 之前 : (''string'') 链接前面显示的文本。没有默认值。
; 之后 : (''string'')链接之后显示的文本。没有默认值。
== Related ==
== Related ==


第34行: 第64行:


{{PHP Function Tag Footer}}
{{PHP Function Tag Footer}}
== 相关的==
{{标签 评论 标签}}
{{PHP 函数标签 页底文字}}

2008年7月1日 (二) 16:36的版本

Description

描述

Displays the comment author's email address, as a mailto link. An email address must be provided if "User must fill out name and email" is enabled under Discussion Options. This tag must be within WordPress:The Loop, or a comment loop.

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

Note: Displaying email addresses is not recommended, as it provides spam collection tools the opportunity to cull them from your site.

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

Usage

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

Examples

Default Usage

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


用法

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

例子

默认用法

电子邮件: <?php 评论_作者_电子邮件_链接(); ?><br />

Link Text and Styling

链接文本和样式

Displays comment author's email link as text string Email Comment Author and adds arrows before and after the link to style it.

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

<?php comment_author_email_link('Email Comment Author', ' > ', ' < '); ?>
<?php 评论_作者_电子邮件_链接('电子邮件评论作者', ' > ', ' < '); ?>
> [[WordPress:#Link_Text_and_Styling|Email Comment Author]] <
> [[WordPress:#Link_Text_and_Styling|电子邮件评论作者]] <

Parameters

参数

linktext
(string) Link text for the email link. Default is the comment author's email address.
before
(string) Text to display before the link. There is no default.
after
(string) Text to display after the link. There is no default.
链接文本
(string) 电子邮件链接的链接文本。默认文本是评论作者的电子邮件地址。
之前
(string) 链接前面显示的文本。没有默认值。
之后
(string)链接之后显示的文本。没有默认值。

Related

模板:Tag Comments Tags

模板:PHP Function Tag Footer


相关的

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 函数标签 页底文字