首页 WordPress函数大全 get_the_time()

get_the_time()

2020-05-02 / 5805阅 / 悠然

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

get_the_time( string $format = '', int|WP_Post $post = null )

Retrieve the time at which the post was written.

描述

参数

$format

(string)
(Optional)
Format to use for retrieving the time the post was written. Either 'G', 'U', or PHP date format defaults to the value specified in the time_format option.

Default value: ''

$post

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

Default value: null

返回

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

大家谈论
    我的见解