WordPress: Template Tags/comment date:修订间差异
来自站长百科
(新页面: == Description == Displays the date a comment was posted. This tag must be within WordPress:The Loop, or a comment loop. == Usage == %%% <?php comment_date('d'); ?> %%% == Example...) |
无编辑摘要 |
||
第1行: | 第1行: | ||
== Description == | == Description == | ||
== 描述== | |||
Displays the date a comment was posted. This tag must be within [[WordPress:The Loop]], or a comment loop. | Displays the date a comment was posted. This tag must be within [[WordPress:The Loop]], or a comment loop. | ||
显示评论发表的日期。必须在[[WordPress:The Loop|The Loop]]或者一个评论loop内使用这个标签。 | |||
== Usage == | == Usage == | ||
%%% <?php comment_date('d'); ?> %%% | %%% <?php comment_date('d'); ?> %%% | ||
== 用法 == | |||
%%% <?php评论_日期('d'); ?> %%% | |||
== Example == | == Example == | ||
== 例子 == | |||
Displays the comment date in the format "6-30-2004": | Displays the comment date in the format "6-30-2004": | ||
以"6-30-2004"的形式,显示评论发表的日期: | |||
Comment posted on <?php comment_date('n-j-Y'); ?> | Comment posted on <?php comment_date('n-j-Y'); ?> | ||
评论发表于<?php comment_date('n-j-Y'); ?> | |||
== Parameters == | == Parameters == | ||
== 参数== | |||
; d : (''string'') Formatting for the date. Defaults to the date format set in WordPress. See [[WordPress:Formatting Date and Time]]. | ; d : (''string'') Formatting for the date. Defaults to the date format set in WordPress. See [[WordPress:Formatting Date and Time]]. | ||
; d : (''string'')日期格式。默认为WordPress中设置的日期格式。请看看[[WordPress:Formatting Date and Time|日期和时间格式]] | |||
== Related == | == Related == | ||
第22行: | 第40行: | ||
{{Tag Footer}} | {{Tag Footer}} | ||
==相关的== | |||
{{标签评论标签}} | |||
{{标签页底文字}} |
2008年7月1日 (二) 17:28的版本
Description
描述
Displays the date a comment was posted. This tag must be within WordPress:The Loop, or a comment loop.
显示评论发表的日期。必须在The Loop或者一个评论loop内使用这个标签。
Usage
%%% <?php comment_date('d'); ?> %%%
用法
%%% <?php评论_日期('d'); ?> %%%
Example
例子
Displays the comment date in the format "6-30-2004":
以"6-30-2004"的形式,显示评论发表的日期:
Comment posted on <?php comment_date('n-j-Y'); ?>
评论发表于<?php comment_date('n-j-Y'); ?>
Parameters
参数
- d
- (string) Formatting for the date. Defaults to the date format set in WordPress. See WordPress:Formatting Date and Time.
- d
- (string)日期格式。默认为WordPress中设置的日期格式。请看看日期和时间格式