[wp-trac] [WordPress Trac] #52187: Create function to resolve a post date from post_date and post_date_gmt strings

WordPress Trac noreply at wordpress.org
Mon Jan 25 01:06:39 UTC 2021


#52187: Create function to resolve a post date from post_date and post_date_gmt
strings
--------------------------------------+---------------------
 Reporter:  jmdodd                    |       Owner:  pento
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  5.7
Component:  Posts, Post Types         |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------
Changes (by pento):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"50012" 50012]:
 {{{
 #!CommitTicketReference repository="" revision="50012"
 Posts: Create a new function for resolving the post date.

 `wp_insert_post()` has a few checks using `post_date` and `post_date_gmt`,
 to determine the correct post date. This functionality is now extracted
 out into a new `wp_resolve_post_date()` function, allowing the checks to
 be reused elsewhere.

 Props jmdodd.
 Fixes #52187.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52187#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list