git-svn-id: https://develop.svn.wordpress.org/trunk@22777 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
11699e0567
commit
f98a3e8941
|
@ -21,6 +21,9 @@ $post_type_object = get_post_type_object( $post_type );
|
||||||
if ( 'post' == $post_type ) {
|
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 ) {
|
||||||
|
wp_redirect( admin_url( 'media-new.php' ) );
|
||||||
|
exit;
|
||||||
} else {
|
} else {
|
||||||
$submenu_file = "post-new.php?post_type=$post_type";
|
$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 ) {
|
if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) {
|
||||||
|
|
Loading…
Reference in New Issue