get_post_time

过滤钩子


apply_filters( 'get_post_time', $time, $format, $gmt )
参数
  • (string|int)
    $time
    Formatted date string or Unix timestamp if `$format` is ‘U’ or ‘G’.
    Required:
  • (string)
    $format
    Format to use for retrieving the time the post was written.
    Accepts ‘G’, ‘U’, or PHP date format.
    Required:
  • (bool)
    $gmt
    Whether to retrieve the GMT time.
    Required:
定义位置
  • wp-includes/general-template.php
    , line 2765
引入
2.6.0
弃用

过滤一个文章的本地化时间。

return apply_filters( 'get_post_time', $time, $format, $gmt );