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:
parent
e24a1ac0dc
commit
400e27e71c
|
@ -22,7 +22,7 @@ if ( 'post' == $post_type ) {
|
||||||
$parent_file = 'edit.php';
|
$parent_file = 'edit.php';
|
||||||
$submenu_file = 'post-new.php';
|
$submenu_file = 'post-new.php';
|
||||||
} elseif ( 'attachment' == $post_type ) {
|
} elseif ( 'attachment' == $post_type ) {
|
||||||
wp_redirect( admin_url( 'media-new.php' ) );
|
if ( wp_redirect( admin_url( 'media-new.php' ) ) )
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
$submenu_file = "post-new.php?post_type=$post_type";
|
$submenu_file = "post-new.php?post_type=$post_type";
|
||||||
|
|
Loading…
Reference in New Issue