WordPress.org

Make WordPress Core

Ticket #18800: 18800.diff

File 18800.diff, 593 bytes (added by MattyRob, 9 years ago)
  • wp-admin/post-new.php

     
    3636wp_enqueue_script('autosave');
    3737
    3838// Show post form.
    39 $post = get_default_post_to_edit( $post_type, true );
     39$posts = get_posts(array('numberposts' => 1, 'post_status' => 'auto-draft'));
     40if ( empty($posts) ) {
     41        $post = get_default_post_to_edit( $post_type, true );
     42} else {
     43        $post = $posts[0];
     44}
    4045$post_ID = $post->ID;
    4146include('edit-form-advanced.php');
    4247include('./admin-footer.php');