Ticket #18800: 18800v2.diff
| File 18800v2.diff, 796 bytes (added by , 14 years ago) |
|---|
-
wp-admin/post-new.php
36 36 wp_enqueue_script('autosave'); 37 37 38 38 // Show post form. 39 $post = get_default_post_to_edit( $post_type, true ); 39 $posts = get_posts(array('numberposts' => 1, 'post_status' => 'auto-draft')); 40 $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post[0]->ID ); 41 $attachments = get_posts($args); 42 if ( empty($posts) && empty($attachments) && $post[0] != $user_ID ) { 43 $post = get_default_post_to_edit( $post_type, true ); 44 } else { 45 $post = $posts[0]; 46 } 40 47 $post_ID = $post->ID; 41 48 include('edit-form-advanced.php'); 42 49 include('./admin-footer.php');