[wp-trac] [WordPress Trac] #17180: Invalid published date insertion in posts

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 19 21:54:04 UTC 2012


#17180: Invalid published date insertion in posts
---------------------------------+-----------------------
 Reporter:  hew                  |       Owner:  westi
     Type:  defect (bug)         |      Status:  reopened
 Priority:  high                 |   Milestone:  3.5
Component:  Date/Time            |     Version:
 Severity:  major                |  Resolution:
 Keywords:  3.5-early has-patch  |
---------------------------------+-----------------------
Changes (by nacin):

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


Comment:

 These filters are two different names. They should probably be the same. I
 usually like filters over wrapper functions, but wp_checkdate() probably
 isn't a bad idea, here. I don't think the context (whether you came from
 wp_insert_post() or edit_post(), or what the post array is) is necessary,
 and if anything it is spurious. If you want to modify a date based on some
 context, there are other filters for that. I usually don't fight for less
 context, but the only context that should matter here is what calendar
 system is being used.

 Also, wp_insert_post() can return 0 depending on $wp_error, so we need to
 avoid returning WP_Error in that case. And whoops has an "h". :-)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17180#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list