-if ( 'page' == $post->post_type ) {
- $submenu_file = 'edit-pages.php';
- $title = __( 'Page Revisions' );
-} else {
- $submenu_file = 'edit.php';
- $title = __( 'Post Revisions' );
-}
+// This is so that the correct "Edit" menu item is selected.
+if ( !empty($post->post_type) && 'post' != $post->post_type )
+ $parent_file = $submenu_file = 'edit.php?post_type=' . $post->post_type;
+else
+ $parent_file = $submenu_file = 'edit.php';