编辑“WordPress:Template Tags/comments number”
该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。
最后版本 | 您的文本 | ||
第1行: | 第1行: | ||
== Description == | |||
== 描述 == | == 描述 == | ||
Displays the total number of comments, [[WordPress:Glossary#Trackback|Trackbacks]], and [[WordPress:Glossary#PingBack|Pingbacks]] for a post. This tag must be within [[WordPress:The Loop]]. | |||
显示评论的总数,文章的[[WordPress:Glossary#Trackback|Trackbacks]], 和[[WordPress:Glossary#PingBack|Pingbacks]]。必须在[[WordPress:The Loop|The Loop]]内部使用这个标签。 | 显示评论的总数,文章的[[WordPress:Glossary#Trackback|Trackbacks]], 和[[WordPress:Glossary#PingBack|Pingbacks]]。必须在[[WordPress:The Loop|The Loop]]内部使用这个标签。 | ||
== Usage == | |||
== 用法 == | == 用法 == | ||
%%% <?php comments_number('zero', 'one', 'more'); ?> %%% | %%% <?php comments_number('zero', 'one', 'more'); ?> %%% | ||
%%% <?php comments_number('零', '一', '更多'); ?> %%% | |||
== Examples == | |||
== 例子 == | == 例子 == | ||
===Text Response to Number of Comments=== | |||
===对于评论数目,文本的回应=== | ===对于评论数目,文本的回应=== | ||
Displays text based upon number of comments: Comment count zero - '''no reponses'''; comment count one - '''one response'''; more than one comment (total 42) displays '''42 responses'''. | |||
根据评论的数目,显示文本:评论数目为零- '''没有回应'''; 评论数目为一 - '''一个回应''';多于一个评论(总共42个评论)显示'''42 个回应'''。 | 根据评论的数目,显示文本:评论数目为零- '''没有回应'''; 评论数目为一 - '''一个回应''';多于一个评论(总共42个评论)显示'''42 个回应'''。 | ||
第15行: | 第28行: | ||
<p>This post currently has | <p>This post currently has | ||
<?php comments_number('no responses','one response','% responses'); ?>.</p> | <?php comments_number('no responses','one response','% responses'); ?>.</p> | ||
<p>This post currently has | |||
<?php comments_number('没有回应','一个回应','% responses'); ?>.</p> | |||
== Parameters == | |||
== 参数 == | == 参数 == | ||
; zero : (''string'')没有评论时候,显示的文本。默认<tt>'没有评论'</tt>。 | ; zero : (''string'') Text to display when there are no comments. Defaults to <tt>'No Comments'</tt>. | ||
; | ; one : (''string'') Text to display when there is one comment. Defaults to <tt>'1 Comment'</tt>. | ||
; | ; more : (''string'') Text to display when there is more than one comment. <tt>%</tt> is replaced by the number of comments, so <tt>'% so far'</tt> is displayed as "5 so far" when there are five comments. Defaults to <tt>'% Comments'</tt>. | ||
; 零 : (''string'') 没有评论时候,显示的文本。默认<tt>'没有评论'</tt>。 | |||
; 一个 : (''string'') 有一个评论时候,显示的文本。默认<tt>'1 个评论'</tt>。 | |||
; 更多的 : (''string'') 不止一个评论时候,显示的文本。<tt>%</tt> 被评论数目代替,因此,当有五个评论的时候,<tt>'% so far'</tt> 显示为 "5 so far" 。默认 <tt>'% 评论'</tt>。 | |||
== Related == | |||
{{Tag Comments Tags}} | |||
{{PHP Function Tag Footer}} | |||
== 相关的 == | == 相关的 == |