Changeset 50034
- Timestamp:
- 01/27/2021 09:52:10 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/revision.php
r49927 r50034 87 87 $args = array( 88 88 'show_split_view' => true, 89 'title_left' => __( 'Removed' ), 90 'title_right' => __( 'Added' ), 89 91 ); 90 92 -
trunk/src/wp-includes/class-wp-text-diff-renderer-table.php
r49193 r50034 177 177 178 178 if ( $this->_show_split_view ) { 179 $r .= '<tr>' . $this->emptyLine() . $this-> emptyLine() . $this->addedLine( $line ) . "</tr>\n";179 $r .= '<tr>' . $this->emptyLine() . $this->addedLine( $line ) . "</tr>\n"; 180 180 } else { 181 181 $r .= '<tr>' . $this->addedLine( $line ) . "</tr>\n"; … … 202 202 } 203 203 if ( $this->_show_split_view ) { 204 $r .= '<tr>' . $this->deletedLine( $line ) . $this->emptyLine() . $this->emptyLine() ."</tr>\n";204 $r .= '<tr>' . $this->deletedLine( $line ) . $this->emptyLine() . "</tr>\n"; 205 205 } else { 206 206 $r .= '<tr>' . $this->deletedLine( $line ) . "</tr>\n"; … … 227 227 } 228 228 if ( $this->_show_split_view ) { 229 $r .= '<tr>' . $this->contextLine( $line ) . $this-> emptyLine() . $this->contextLine( $line ) . "</tr>\n";229 $r .= '<tr>' . $this->contextLine( $line ) . $this->contextLine( $line ) . "</tr>\n"; 230 230 } else { 231 231 $r .= '<tr>' . $this->contextLine( $line ) . "</tr>\n"; … … 320 320 } else { // A true changed row. 321 321 if ( $this->_show_split_view ) { 322 $r .= '<tr>' . $this->deletedLine( $orig_line ) . $this-> emptyLine() . $this->addedLine( $final_line ) . "</tr>\n";322 $r .= '<tr>' . $this->deletedLine( $orig_line ) . $this->addedLine( $final_line ) . "</tr>\n"; 323 323 } else { 324 324 $r .= '<tr>' . $this->deletedLine( $orig_line ) . '</tr><tr>' . $this->addedLine( $final_line ) . "</tr>\n"; -
trunk/src/wp-includes/pluggable.php
r49844 r50034 2839 2839 } 2840 2840 2841 $r = "<table class='diff'>\n"; 2842 2843 if ( ! empty( $args['show_split_view'] ) ) { 2844 $r .= "<col class='content diffsplit left' /><col class='content diffsplit middle' /><col class='content diffsplit right' />"; 2845 } else { 2846 $r .= "<col class='content' />"; 2847 } 2848 2849 if ( $args['title'] || $args['title_left'] || $args['title_right'] ) { 2841 $is_split_view = ! empty( $args['show_split_view'] ); 2842 $is_split_view_class = $is_split_view ? ' is-split-view' : ''; 2843 2844 $r = "<table class='diff$is_split_view_class'>\n"; 2845 2846 if ( $args['title'] ) { 2847 $r .= "<caption class='diff-title'>$args[title]</caption>\n"; 2848 } 2849 2850 if ( $args['title_left'] || $args['title_right'] ) { 2850 2851 $r .= '<thead>'; 2851 2852 } 2852 if ( $args['title'] ) { 2853 $r .= "<tr class='diff-title'><th colspan='4'>$args[title]</th></tr>\n"; 2854 } 2853 2855 2854 if ( $args['title_left'] || $args['title_right'] ) { 2855 $th_or_td_left = empty( $args['title_left'] ) ? 'td' : 'th'; 2856 $th_or_td_right = empty( $args['title_right'] ) ? 'td' : 'th'; 2857 2856 2858 $r .= "<tr class='diff-sub-title'>\n"; 2857 $r .= "\t<td></td><th>$args[title_left]</th>\n"; 2858 $r .= "\t<td></td><th>$args[title_right]</th>\n"; 2859 $r .= "\t<$th_or_td_left>$args[title_left]</$th_or_td_left>\n"; 2860 if ( $is_split_view ) { 2861 $r .= "\t<$th_or_td_right>$args[title_right]</$th_or_td_right>\n"; 2862 } 2859 2863 $r .= "</tr>\n"; 2860 2864 } 2861 if ( $args['title'] || $args['title_left'] || $args['title_right'] ) { 2865 2866 if ( $args['title_left'] || $args['title_right'] ) { 2862 2867 $r .= "</thead>\n"; 2863 2868 }
Note: See TracChangeset
for help on using the changeset viewer.