X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/4713a14935b83517997f3c88f808eb41da55033d..2329f698283944696a7076258cf816545970bb47:/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 );