Post timestamp creation should use whitelisted post statuses instead of blacklisted
|Reported by:||danielbachhuber||Owned by:||danielbachhuber|
|Severity:||normal||Keywords:||has-patch needs-testing editorial-flow|
post_date and post_date_gmt timestamps are created when a post is published. The method should create timestamps based on whitelisted post statuses, instead of "not in a blacklist" as it exists currently.
Backstory: We have a plugin that allows users to create custom statuses. It uses the partially completed custom status API and additional code we've written. In the WordPress.org forum, a bug was reported where if they use a custom status with a post, the post time is set. Currently, they have to manually edit the timestamp of the post before publishing in order for it to be set to the proper publication date (instead of 5 days ago when they originally created it).
The origin of the problem is line #2506 in wp-includes/post.php. The post statuses to receive timestamps should be whitelisted instead of blacklisted. Because the custom statuses aren't a part of the blacklist, they receive a GMT timesteamp.
Change History (10)
- Keywords needs-testing added
- Owner set to danielbachhuber
- Status changed from new to assigned