WordPress.org

Make WordPress Core

Ticket #22491: 22491.diff

File 22491.diff, 997 bytes (added by helenyhou, 17 months ago)
  • wp-admin/post-new.php

     
    4343if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) ) 
    4444        wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' ); 
    4545 
    46 wp_enqueue_script('autosave'); 
     46if ( 'attachment' !== $post_type ) 
     47        wp_enqueue_script('autosave'); 
    4748 
    4849// Show post form. 
    4950$post = get_default_post_to_edit( $post_type, true ); 
  • wp-admin/post.php

     
    169169                add_action('admin_notices', '_admin_notice_post_locked' ); 
    170170        } else { 
    171171                $active_post_lock = wp_set_post_lock( $post->ID ); 
    172                 wp_enqueue_script('autosave'); 
     172 
     173                if ( 'attachment' !== $post_type ) 
     174                        wp_enqueue_script('autosave'); 
    173175        } 
    174176 
    175177        $title = $post_type_object->labels->edit_item;