From 121726df31d4510516ee5ec6831eb1eb245d259e Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 10 Jun 2014 18:47:57 +0000 Subject: [PATCH] `edit.php?post_type=attachment` should redirect to `upload.php`. Without the redirect, the user is presented with an empty list table. There are probably other issues to address overall, but this accomplishes what the ticket wants. Props knutsp. Fixes #27951. git-svn-id: https://develop.svn.wordpress.org/trunk@28729 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-admin/edit.php b/src/wp-admin/edit.php index a062b0911a..241b8fbd3f 100644 --- a/src/wp-admin/edit.php +++ b/src/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 );