get_post_time()
get_post_time( string $format = ‘U’, bool $gmt = false,…
get_post_time( string $format = ‘U’, bool $gmt = false, int|WP_Post $post = null, bool $translate = false )
检索写邮件的时间。
Retrieve the time at which the post was written.
目录锚点:#参数#返回#源码
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 | 
|---|---|---|---|
| $format | (string) | 可选 | 用于检索邮件写入时间的格式。“G”、“U”或PHP日期格式。 | 
| $gmt | (bool) | 可选 | 是否检索GMT时间。 | 
| $post | (int | WP_Post) | 可选 | WP_Post object或ID。默认值为全局$Post object。 | 
| $translate | (bool) | 可选 | 是否翻译时间字符串。 | 
返回(Return)
(string|int|false)格式化的日期string或Unix时间戳(string|int|false)。失败时为False。
源码(Source)
| 更新版本 | 源码位置 | 使用 | 被使用 | 
|---|---|---|---|
| 2.0.0 | wp-includes/general-template.php:2564 | 5 | 5 | 
类别:WordPress 函数手册、 
		本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!