Redirect post-new.php?post_type=attachment to media-new.php. see #22491, #22083, #21391.

git-svn-id: http://core.svn.wordpress.org/trunk@22777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-21 17:40:53 +00:00
parent c27d5dab73
commit f26102a248

View File

@ -21,6 +21,9 @@ $post_type_object = get_post_type_object( $post_type );
if ( 'post' == $post_type ) {
$parent_file = 'edit.php';
$submenu_file = 'post-new.php';
} elseif ( 'attachment' == $post_type ) {
wp_redirect( admin_url( 'media-new.php' ) );
exit;
} else {
$submenu_file = "post-new.php?post_type=$post_type";
if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) {