Make WordPress Core


Ignore:
Timestamp:
02/14/2006 11:22:22 PM (21 years ago)
Author:
ryan
Message:

Give future posts a post_status of future when upgrading.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upgrade-functions.php

    r3517 r3531  
    355355        if ( $wp_current_db_version < 3513 ) {
    356356                populate_roles_210();
     357        }
     358
     359        if ( $wp_current_db_version < 3531 ) {
     360                // Give future posts a post_status of future.
     361                $now = gmdate('Y-m-d H:i:59');
     362                $posts = $wpdb->query ("UPDATE $wpdb->posts SET post_status = 'future' WHERE post_status = 'publish' and post_date_gmt < '$now'");
    357363        }
    358364}
Note: See TracChangeset for help on using the changeset viewer.