diff --git a/src/wp-admin/includes/revision.php b/src/wp-admin/includes/revision.php index 6b05442370..f431493fc1 100644 --- a/src/wp-admin/includes/revision.php +++ b/src/wp-admin/includes/revision.php @@ -111,8 +111,20 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { // It's a better user experience to still show the Title, even if it didn't change. // No, you didn't see this. $diff = ''; - $diff .= ''; - $diff .= ''; + + // In split screen mode, show the title before/after side by side. + if ( true === $args['show_split_view'] ) { + $diff .= ''; + } else { + $diff .= ''; + + // In single column mode, only show the title once if unchanged. + if ( $compare_from->post_title !== $compare_to->post_title ) { + $diff .= ''; + } + } + + $diff .= ''; $diff .= '
' . esc_html( $compare_from->post_title ) . '' . esc_html( $compare_to->post_title ) . '
' . esc_html( $compare_from->post_title ) . '' . esc_html( $compare_to->post_title ) . '' . esc_html( $compare_from->post_title ) . '
' . esc_html( $compare_to->post_title ) . '
'; }