1. 首页
  2. WordPress 函数手册

the_modified_time()

the_modified_time( string $format =  )

显示文章上次修改的时间。
Display the time at which the post was last modified.

目录锚点:#参数#源码#笔记


参数(Parameters)

参数 类型 说明
$format (string) “G”、“U”或PHP日期格式默认为time_format选项中指定的值。

源码(Source)

/**
 * Display the time at which the post was last modified.
 *
 * @since 2.0.0
 *
 * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
 */
function the_modified_time($d = '') {
	/**
	 * Filter the localized time a post was last modified, for display.
	 *
	 * @since 2.0.0
	 *
	 * @param string $get_the_modified_time The formatted time.
	 * @param string $d                     The time format. Accepts 'G', 'U',
	 *                                      or php date format. Defaults to value
	 *                                      specified in 'time_format' option.
	 */
	echo apply_filters( 'the_modified_time', get_the_modified_time($d), $d );
}
更新版本 源码位置 使用 被使用
2.0.0 wp-includes/general-template.php 7 6

笔记(Notes)

默认用法

the_modified_time() 为WP2原创文章,链接:https://www.wp2.cn/functions/the_modified_time/