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
This commit is contained in:
parent
f54bb586c8
commit
121726df31
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user