[wp-trac] [WordPress Trac] #51289: Documentation issue: get_post_time is getting the time when published not when created
WordPress Trac
noreply at wordpress.org
Thu Sep 10 19:50:39 UTC 2020
#51289: Documentation issue: get_post_time is getting the time when published not
when created
--------------------------+-----------------------------
Reporter: casiepa | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: docs |
--------------------------+-----------------------------
I'm having a doubt with
https://developer.wordpress.org/reference/functions/get_post_time/
(probably the same with
https://developer.wordpress.org/reference/functions/get_the_date/)
They both say 'Retrieve the date on which the post was written.', but from
some programming I'm doing now it looks more like 'Retrieve the date on
which the post was PUBLISHED.'.
Test: create a post in draft or pending and check that date using the
function. (I'm doing it with a CPT)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51289>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list