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.

Built from https://develop.svn.wordpress.org/trunk@28729


git-svn-id: http://core.svn.wordpress.org/trunk@28543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-06-10 18:48:15 +00:00
parent 2d23c8fea7
commit 0da44fad8e

View File

@ -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 );