scripts.mit.edu
/
autoinstalls
/
wordpress.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
WordPress 4.0.1-scripts
[autoinstalls/wordpress.git]
/
wp-admin
/
edit.php
diff --git
a/wp-admin/edit.php
b/wp-admin/edit.php
index a062b0911acba2885db444fa6c584df6351da701..241b8fbd3f901302869c6b7d8de0e3649bbe32e9 100644
(file)
--- 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 );