首页 WordPress函数大全 get_post_modified_time()

get_post_modified_time()

2020-05-01 / 3953阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_post_modified_time( string $format = 'U', bool $gmt = false, int|WP_Post $post = null, bool $translate = false )

Retrieve the time at which the post was last modified.

描述

参数

$format

(string)
(Optional)
Format to use for retrieving the time the post was modified. Either 'G', 'U', or PHP date format.

Default value: 'U'

$gmt

(bool)
(Optional)
Whether to retrieve the GMT time.

Default value: false

$post

(int|WP_Post)
(Optional)
WP_Post object or ID. Default is global $post object.

Default value: null

$translate

(bool)
(Optional)
Whether to translate the time string.

Default value: false

返回

(string|int|false) Formatted date string or Unix timestamp if $format is 'U' or 'G'. False on failure.

大家谈论
    我的见解