Let the wp_redirect to media-new.php from post-new.php?post_type=attachment be canceled using the wp_redirect filter.

props DrewAPicture.
fixes #25216.


git-svn-id: https://develop.svn.wordpress.org/trunk@25453 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-09-16 17:51:58 +00:00
parent e24a1ac0dc
commit 400e27e71c
1 changed files with 2 additions and 2 deletions

View File

@ -22,8 +22,8 @@ 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;
if ( 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 ) {