WordPress: Template Tags/comment ID:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
第1行: 第1行:
== 描述 ==
== 描述 ==
Displays the numeric ID of a comment. This tag must be within [[WordPress:The Loop]], or a comment loop.


显示评论的ID数字。必须在[[WordPress:The Loop|The Loop]]或者评论loop内部使用这个标签。
显示评论的ID数字。必须在[[WordPress:The Loop|The Loop]]或者评论loop内部使用这个标签。
== Usage ==


== 用法 ==
== 用法 ==


%%% <?php comment_ID(); ?> %%%
%%% <?php comment_ID(); ?> %%%
%%% <?php comment_ID(); ?> %%%
== Examples ==
=== Default Usage ===


== 例子 ==
== 例子 ==


=== 默认用法 ===
=== 默认用法 ===
&lt;p&gt;This is comment <?php comment_ID(); ?> for all comments.&lt;/p&gt;


&lt;p&gt;This is comment <?php comment_ID(); ?> for all comments.&lt;/p&gt;
&lt;p&gt;This is comment <?php comment_ID(); ?> for all comments.&lt;/p&gt;
=== Comment ID as Anchor ID ===


===评论ID 作为Anchor ID ===
===评论ID 作为Anchor ID ===
Uses the comment ID as an anchor id for a comment.


使用评论ID作为一个评论的anchor id。
使用评论ID作为一个评论的anchor id。
&lt;div id="comment-<?php comment_ID() ?>"&gt;Comment by
<?php comment_author() ?>: &lt;/div&gt;
&lt;div class="comment-text"&gt;<?php comment_text() ?>&lt;/div&gt;


&lt;div id="comment-<?php comment_ID() ?>"&gt;Comment by  
&lt;div id="comment-<?php comment_ID() ?>"&gt;Comment by  
  <?php comment_author() ?>: &lt;/div&gt;
  <?php comment_author() ?>: &lt;/div&gt;
  &lt;div class="comment-text"&gt;<?php comment_text() ?>&lt;/div&gt;
  &lt;div class="comment-text"&gt;<?php comment_text() ?>&lt;/div&gt;
== Parameters ==
This tag has no parameters.
== Related ==
{{Tag Comments Tags}}
{{No Param Tag Footer}}


==参数 ==
==参数 ==

2008年7月11日 (五) 14:45的最新版本

描述[ ]

显示评论的ID数字。必须在The Loop或者评论loop内部使用这个标签。

用法[ ]

%%% <?php comment_ID(); ?> %%%

例子[ ]

默认用法[ ]

<p>This is comment <?php comment_ID(); ?> for all comments.</p>

评论ID 作为Anchor ID[ ]

使用评论ID作为一个评论的anchor id。

<div id="comment-<?php comment_ID() ?>">Comment by

<?php comment_author() ?>: </div>
<div class="comment-text"><?php comment_text() ?></div>

参数[ ]

这个标签没有参数。

相关的[ ]

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