Make WordPress Core


Ignore:
Timestamp:
06/14/2007 04:24:28 PM (17 years ago)
Author:
markjaquith
Message:

Introducing post_status="pending". see #4446 and put any initial bug reports on that ticket

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r5700 r5707  
    554554    // If the post date is empty (due to having been new or a draft) and status is not 'draft', set date to now
    555555    if (empty($post_date)) {
    556         if ( 'draft' != $post_status )
     556        if ( !in_array($post_status, array('draft', 'pending')) )
    557557            $post_date = current_time('mysql');
    558558    }
    559559
    560560    if (empty($post_date_gmt)) {
    561         if ( 'draft' != $post_status )
     561        if ( !in_array($post_status, array('draft', 'pending')) )
    562562            $post_date_gmt = get_gmt_from_date($post_date);
    563563    }
     
    739739
    740740    // 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']) &&
    742742             ('0000-00-00 00:00:00' == $post['post_date']) )
    743743        $clear_date = true;
Note: See TracChangeset for help on using the changeset viewer.