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.

Built from https://develop.svn.wordpress.org/trunk@25453


git-svn-id: http://core.svn.wordpress.org/trunk@25374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-09-16 17:52:10 +00:00
parent 188f763120
commit 5f9a631983
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 ) {