Changeset 5707 for trunk/wp-includes/post.php
- Timestamp:
- 06/14/2007 04:24:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r5700 r5707 554 554 // If the post date is empty (due to having been new or a draft) and status is not 'draft', set date to now 555 555 if (empty($post_date)) { 556 if ( 'draft' != $post_status)556 if ( !in_array($post_status, array('draft', 'pending')) ) 557 557 $post_date = current_time('mysql'); 558 558 } 559 559 560 560 if (empty($post_date_gmt)) { 561 if ( 'draft' != $post_status)561 if ( !in_array($post_status, array('draft', 'pending')) ) 562 562 $post_date_gmt = get_gmt_from_date($post_date); 563 563 } … … 739 739 740 740 // Drafts shouldn't be assigned a date unless explicitly done so by the user 741 if ( 'draft' == $post['post_status']&& empty($postarr['edit_date']) && empty($postarr['post_date']) &&741 if ( in_array($post['post_status'], array('draft', 'pending')) && empty($postarr['edit_date']) && empty($postarr['post_date']) && 742 742 ('0000-00-00 00:00:00' == $post['post_date']) ) 743 743 $clear_date = true;
Note: See TracChangeset
for help on using the changeset viewer.