Ensure the Parent menu is hilighted correctly when Custom Post Types are shown under an existing top level menu. Fixes #16015 props duck_.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-12-29 16:25:22 +00:00
parent 9b3c2a5db3
commit 7b0389984e
1 changed files with 4 additions and 1 deletions

View File

@ -162,6 +162,9 @@ case 'edit':
$parent_file = "edit.php";
$submenu_file = "edit.php";
} else {
if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
$parent_file = $post_type_object->show_in_menu;
else
$parent_file = "edit.php?post_type=$post_type";
$submenu_file = "edit.php?post_type=$post_type";
}