[wp-trac] [WordPress Trac] #18362: Post timestamp creation should use whitelisted post statuses instead of blacklisted

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 9 16:51:56 UTC 2011


#18362: Post timestamp creation should use whitelisted post statuses instead of
blacklisted
-----------------------------+-----------------------------
 Reporter:  danielbachhuber  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:
 Severity:  normal           |   Keywords:
-----------------------------+-----------------------------
 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
 [http://wordpress.org/support/topic/plugin-edit-flow-custom-statuses-
 create-timestamp-problem 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
 [http://core.trac.wordpress.org/browser/tags/3.2.1/wp-
 includes/post.php#L2506 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18362>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list