Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#48113 closed defect (bug) (fixed)

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

Reported by: timothyblynjacobs's profile TimothyBlynJacobs Owned by: timothyblynjacobs's profile TimothyBlynJacobs
Milestone: 5.3 Priority: normal
Severity: normal Version: 5.3
Component: General Keywords: has-patch has-unit-tests
Focuses: Cc:


#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 5 years ago.
48113.2.diff (1.9 KB) - added by TimothyBlynJacobs 5 years ago.

Download all attachments as: .zip

Change History (5)

#1 @TimothyBlynJacobs
5 years 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
5 years 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
5 years 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.