X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0461a5f2e55c8d5f1fde96ca2e83117152573c7d..9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f:/wp-admin/edit.php diff --git a/wp-admin/edit.php b/wp-admin/edit.php index a062b091..241b8fbd 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -12,6 +12,12 @@ require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! $typenow ) wp_die( __( 'Invalid post type' ) ); +if ( 'attachment' === $typenow ) { + if ( wp_redirect( admin_url( 'upload.php' ) ) ) { + exit; + } +} + $post_type = $typenow; $post_type_object = get_post_type_object( $post_type );