| 1 | Index: wp-admin/post-new.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/post-new.php (revision 22704) |
|---|
| 4 | +++ wp-admin/post-new.php (working copy) |
|---|
| 5 | @@ -43,7 +43,8 @@ |
|---|
| 6 | if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) ) |
|---|
| 7 | wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' ); |
|---|
| 8 | |
|---|
| 9 | -wp_enqueue_script('autosave'); |
|---|
| 10 | +if ( 'attachment' !== $post_type ) |
|---|
| 11 | + wp_enqueue_script('autosave'); |
|---|
| 12 | |
|---|
| 13 | // Show post form. |
|---|
| 14 | $post = get_default_post_to_edit( $post_type, true ); |
|---|
| 15 | Index: wp-admin/post.php |
|---|
| 16 | =================================================================== |
|---|
| 17 | --- wp-admin/post.php (revision 22704) |
|---|
| 18 | +++ wp-admin/post.php (working copy) |
|---|
| 19 | @@ -169,7 +169,9 @@ |
|---|
| 20 | add_action('admin_notices', '_admin_notice_post_locked' ); |
|---|
| 21 | } else { |
|---|
| 22 | $active_post_lock = wp_set_post_lock( $post->ID ); |
|---|
| 23 | - wp_enqueue_script('autosave'); |
|---|
| 24 | + |
|---|
| 25 | + if ( 'attachment' !== $post_type ) |
|---|
| 26 | + wp_enqueue_script('autosave'); |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | $title = $post_type_object->labels->edit_item; |
|---|