Make WordPress Core


Ignore:
Timestamp:
04/10/2010 02:00:30 PM (15 years ago)
Author:
dd32
Message:

Update Future Scheduled posts publish status to Published upon updating the date to a past date. Props bumbu. Fixes #12751

File:
1 edited

Legend:

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

    r14056 r14062  
    21562156        if ( mysql2date('U', $post_date_gmt, false) > mysql2date('U', $now, false) )
    21572157            $post_status = 'future';
     2158    } elseif( 'future' == $post_status ) {
     2159        $now = gmdate('Y-m-d H:i:59');
     2160        if ( mysql2date('U', $post_date_gmt, false) <= mysql2date('U', $now, false) )
     2161            $post_status = 'publish';
    21582162    }
    21592163
Note: See TracChangeset for help on using the changeset viewer.