WordPress.org

Make WordPress Core

Ticket #22687: 22687.diff

File 22687.diff, 395 bytes (added by nacin, 2 years ago)

This is probably sufficient to block storing the initial auto-draft as a revision.

  • wp-includes/post.php

     
    49214921        if ( !$post = get_post( $post_id, ARRAY_A ) ) 
    49224922                return; 
    49234923 
     4924        if ( 'auto-draft' == $post['post_status'] ) 
     4925                return; 
     4926 
    49244927        if ( !post_type_supports($post['post_type'], 'revisions') ) 
    49254928                return; 
    49264929