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

git-svn-id: https://develop.svn.wordpress.org/trunk@22777 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-11-21 17:40:53 +00:00
parent 11699e0567
commit f98a3e8941
1 changed files with 3 additions and 0 deletions

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 ) {