WordPress.org

Make WordPress Core

Opened 8 weeks ago

Closed 8 weeks ago

Last modified 7 weeks ago

#48113 closed defect (bug) (fixed)

Update hard coded list of floating dates to use new date_floating post status arg

Reported by: TimothyBlynJacobs Owned by: TimothyBlynJacobs
Milestone: 5.3 Priority: normal
Severity: normal Version: 5.3
Component: General Keywords: has-patch has-unit-tests
Focuses: Cc:
PR Number:

Description

#39953 added a date_floating post status argument that clients can use to determine whether the post status is floating instead of relying on a hardcoded list.

We also need to update that hardcoded list in wp_insert_post() so that the post_date_gmt can be set to 0000-00-00 00:00:00 in that case as well.

Attachments (2)

48113.diff (1.6 KB) - added by TimothyBlynJacobs 8 weeks ago.
48113.2.diff (1.9 KB) - added by TimothyBlynJacobs 8 weeks ago.

Download all attachments as: .zip

Change History (5)

#1 @TimothyBlynJacobs
8 weeks ago

Added a patch. Currently there is one expected unit test failure, test_create_post_as_contributor. That should be fixed when the pending post status is marked as date_floating.

#2 @kadamwhite
8 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 46279:

Posts, Post Types: Build list of "date floating" post stati dynamically when inserting post.

Completes work begun in #39953 to expose "date floating" status information to frontend clients via the REST API.

Props TimothyBlynJacobs.
Fixes #48113.

#3 @SergeyBiryukov
7 weeks ago

In 46318:

REST API: Use delta comparison for floating date test added in [46279] to avoid race conditions.

See #48113.

Note: See TracTickets for help on using tickets.