-if ( 'page' == $post->post_type ) {
- $submenu_file = 'edit-pages.php';
- $title = __( 'Page Revisions' );
-} else {
- $submenu_file = 'edit.php';
- $title = __( 'Post Revisions' );
-}
-
-require_once( 'admin-header.php' );
-
-?>
-
-<div class="wrap">
-
-<h2 class="long-header"><?php echo $h2; ?></h2>
-
-<table class="form-table ie-fixed">
- <col class="th" />
-<?php if ( 'diff' == $action ) : ?>
-<tr id="revision">
- <th scope="row"></th>
- <th scope="col" class="th-full">
- <span class="alignleft"><?php printf( __('Older: %s'), wp_post_revision_title( $left_revision ) ); ?></span>
- <span class="alignright"><?php printf( __('Newer: %s'), wp_post_revision_title( $right_revision ) ); ?></span>
- </th>
-</tr>
-<?php endif;
-
-// use get_post_to_edit filters?
-$identical = true;
-foreach ( _wp_post_revision_fields() as $field => $field_title ) :
- if ( 'diff' == $action ) {
- $left_content = apply_filters( "_wp_post_revision_field_$field", $left_revision->$field, $field );
- $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field );
- if ( !$content = wp_text_diff( $left_content, $right_content ) )
- continue; // There is no difference between left and right
- $identical = false;
- } else {
- add_filter( "_wp_post_revision_field_$field", 'htmlspecialchars' );
- $content = apply_filters( "_wp_post_revision_field_$field", $revision->$field, $field );
- }
- ?>
-
- <tr id="revision-field-<?php echo $field; ?>">
- <th scope="row"><?php echo wp_specialchars( $field_title ); ?></th>
- <td><div class="pre"><?php echo $content; ?></div></td>
- </tr>
+// 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';