WordPress:Template Tags/the modified date
描述
This tag displays the date (and time) a post was last modified. This tag works just like the_modified_time(), which also displays the time/date a post was last modified. This tag must be used within WordPress:The Loop. If no format parameter is specified, the Default date format (please note that says Date format) setting from Administration > Settings > General is used for the display format.
这个标签显示了文章最后一次更改的日期(和时间)。这个标签的运行方式与the_更改的_时间()相似,同时也显示了最后更改的时间/日期。必须在The Loop内使用这个标签。如果没有指定格式参数,管理 > 设置 > 总的 中的默认时间格式(请注意显示时间格式的设置)设置用来显示时间格式。
If the post or page is not yet modified, the modified date is the same as the creation date.
如果文章或者网页仍然没有更改,更改的日期仍然与编成日期相同。
Usage
%%% <?php the_modified_date('d'); ?> %%%
用法
%%% <?php the_更改的_日期('d'); ?> %%%
Examples
Default Usage
例子
默认用法
Displays the date the post was last modified, using the Default date format setting (e.g. F j, Y) from Administration > Settings > General.
显示文章最后更改的日期,使用管理 > 设置 > 总的中的默认日期格式 设置 (例如 F j, Y)。
<p>Last modified: <?php the_modified_date(); ?></p>
<p>最后更改的: <?php the_更改的_日期(); ?></p>
Date as Month Day, Year
按年,月,日排列的日期
Displays the last modified date in the date format 'F j, Y' (ex: December 2, 2006).
用日期格式'F j, Y' (例如: 2006年12月2日)显示最后更改的日期。
<div>Last modified: <?php the_modified_date('F j, Y'); ?></div>
<div>最后一次更改: <?php the_modified_date('F j, Y'); ?></div>
Date and Time
日期和时间
Displays the date and time. 显示日期和时间。
<p>Modified: <?php the_modified_date('F j, Y'); ?> at <?php the_modified_date('g:i a'); ?></p>
<p>更改的: <?php the_更改的_日期('F j, Y'); ?> at <?php the_modified_date('g:i a'); ?></p>
Parameters
参数
- d
- (string) The format the date is to display in. Defaults to the date format configured in your WordPress options. See WordPress:Formatting Date and Time.
- d
- (string)日期需要显示的格式。默认为WordPress选项中配置的日期格式。请看看日期和时间格式。