WordPress.org

Make WordPress Core

Ticket #42402: 42402.diff

File 42402.diff, 1.1 KB (added by mbelchev, 3 years ago)
  • src/wp-admin/includes/revision.php

     
    104104                        // It's a better user experience to still show the Title, even if it didn't change.
    105105                        // No, you didn't see this.
    106106                        $diff = '<table class="diff"><colgroup><col class="content diffsplit left"><col class="content diffsplit middle"><col class="content diffsplit right"></colgroup><tbody><tr>';
    107                         $diff .= '<td>' . esc_html( $compare_from->post_title ) . '</td><td></td><td>' . esc_html( $compare_to->post_title ) . '</td>';
     107                        $diff .= '<td>' . esc_html( $compare_from->post_title ) . '</td>';
     108                       
     109                        if ( true !== $args['show_split_view'] ) {
     110                                // Show the title on new row when the split mode is activated
     111                                $diff .= '</tr><tr>';
     112                        } else {
     113                                // Show an empty column when the split mode is off since the table has three columns
     114                                $diff .= '<td></td>';
     115                        }
     116                       
     117                        $diff .= '<td>' . esc_html( $compare_to->post_title ) . '</td>';
    108118                        $diff .= '</tr></tbody>';
    109119                        $diff .= '</table>';
    110120                }