首页 WordPress函数大全 get_the_date()

get_the_date()

2020-05-02 / 4531阅 / 悠然

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

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

Retrieve the date>

Contents

  • Description
    • Parameters
    • Return
    • Source
    • Changelog
  • Related
    • Uses
    • Used By
  • User Contributed Notes

描述

Unlike the_date() this function will always return the date. Modify output with the ‘get_the_date’ filter.

参数

$format

(string)
(Optional)
PHP date format defaults to the date_format option if not specified.

Default value: ''

$post

(int|WP_Post)
(Optional)
Post ID or WP_Post object. Default current post.

Default value: null

返回

(string|false) Date the current post was written. False on failure.

大家谈论
    我的见解