mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user