diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 85930a999f..081a435258 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -418,3 +418,21 @@ if ( post_type_supports( $post_type, 'comments' ) ) try{document.post.title.focus();}catch(e){} + + + + diff --git a/wp-admin/post-new.php b/wp-admin/post-new.php index f5b9097bcb..8ba1862bfe 100644 --- a/wp-admin/post-new.php +++ b/wp-admin/post-new.php @@ -43,7 +43,8 @@ if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_ if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) ) wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' ); -wp_enqueue_script('autosave'); +if ( 'attachment' !== $post_type ) + wp_enqueue_script('autosave'); // Show post form. $post = get_default_post_to_edit( $post_type, true ); diff --git a/wp-admin/post.php b/wp-admin/post.php index 254972d38f..c638c18d39 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -169,7 +169,9 @@ case 'edit': add_action('admin_notices', '_admin_notice_post_locked' ); } else { $active_post_lock = wp_set_post_lock( $post->ID ); - wp_enqueue_script('autosave'); + + if ( 'attachment' !== $post_type ) + wp_enqueue_script('autosave'); } $title = $post_type_object->labels->edit_item;