Make WordPress Core

Ticket #3020: post.php.diff

File post.php.diff, 642 bytes (added by masquerade, 18 years ago)

Apply along with above.

  • wp-admin/post.php

     
    4545case 'edit':
    4646        $title = __('Edit');
    4747        $editing = true;
     48        $post_ID = $p = (int) $_GET['post'];
     49        $post = get_post($post_ID);
     50        if($post->post_status == 'draft') {
     51                wp_enqueue_script('prototype');
     52                wp_enqueue_script('autosave');
     53        }
    4854        require_once('admin-header.php');
    4955
    50         $post_ID = $p = (int) $_GET['post'];
    51 
    52         $post = get_post($post_ID);
    5356        if ( !current_user_can('edit_post', $post_ID) )
    5457                die ( __('You are not allowed to edit this post.') );
    5558