WordPress.org

Make WordPress Core

Changeset 8640


Ignore:
Timestamp:
08/13/2008 07:15:26 PM (13 years ago)
Author:
ryan
Message:

Make sure timestamps are not 0000 when publishing. Props techcookies. fixes #6527 for 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/wp-includes/post.php

    r8532 r8640  
    12771277
    12781278    // If the post date is empty (due to having been new or a draft) and status is not 'draft', set date to now
    1279     if (empty($post_date)) {
     1279    if ( empty($post_date) || '0000-00-00 00:00:00' == $post_date ) {
    12801280        if ( !in_array($post_status, array('draft', 'pending')) )
    12811281            $post_date = current_time('mysql');
     
    12841284    }
    12851285
    1286     if (empty($post_date_gmt)) {
     1286    if ( empty($post_date_gmt) || '0000-00-00 00:00:00' == $post_date_gmt ) {
    12871287        if ( !in_array($post_status, array('draft', 'pending')) )
    12881288            $post_date_gmt = get_gmt_from_date($post_date);
Note: See TracChangeset for help on using the changeset viewer.