Make WordPress Core

Ticket #19907: 27578.diff

File 27578.diff, 519 bytes (added by Denis-de-Bernardy, 11 years ago)

Alternative fix, which also fixes the issue when a draft post is trashed or untrashed

  • src/wp-includes/post.php

     
    28262826                else
    28272827                        $post_date_gmt = '0000-00-00 00:00:00';
    28282828        }
     2829    elseif ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) {
     2830        $post_date_gmt = '0000-00-00 00:00:00';
     2831    }
    28292832
    28302833        if ( $update || '0000-00-00 00:00:00' == $post_date ) {
    28312834                $post_modified     = current_time( 'mysql' );