mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-01 08:37:55 +02:00
git-svn-id: http://core.svn.wordpress.org/trunk@22777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c27d5dab73
commit
f26102a248
@ -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
Block a user