Ticket #24908: 24908.diff
File 24908.diff, 2.1 KB (added by , 11 years ago) |
---|
-
wp-includes/wp-diff.php
154 154 $r = ''; 155 155 foreach ($lines as $line) { 156 156 if ( $encode ) 157 $line = htmlspecialchars($line );157 $line = apply_filters( 'process_revision_diff_html', htmlspecialchars( $line ), $line ); 158 158 if ( $this->_show_split_view ) { 159 159 $r .= '<tr>' . $this->emptyLine() . $this->emptyLine() . $this->addedLine( $line ) . "</tr>\n"; 160 160 } else { … … 176 176 $r = ''; 177 177 foreach ($lines as $line) { 178 178 if ( $encode ) 179 $line = htmlspecialchars($line );179 $line = apply_filters( 'process_revision_diff_html', htmlspecialchars( $line ), $line ); 180 180 if ( $this->_show_split_view ) { 181 181 $r .= '<tr>' . $this->deletedLine( $line ) . $this->emptyLine() . $this->emptyLine() . "</tr>\n"; 182 182 } else { … … 199 199 $r = ''; 200 200 foreach ($lines as $line) { 201 201 if ( $encode ) 202 $line = htmlspecialchars($line );202 $line = apply_filters( 'process_revision_diff_html', htmlspecialchars( $line ), $line ); 203 203 if ( $this->_show_split_view ) { 204 204 $r .= '<tr>' . $this->contextLine( $line ) . $this->emptyLine() . $this->contextLine( $line ) . "</tr>\n"; 205 205 } else { -
wp-admin/includes/revision.php
58 58 $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_$field", $compare_from->$field, $field, $compare_from, 'from' ) : ''; 59 59 $content_to = apply_filters( "_wp_post_revision_field_$field", $compare_to->$field, $field, $compare_to, 'to' ); 60 60 61 $diff = wp_text_diff( $content_from, $content_to, array( 'show_split_view' => true ) ); 61 $show_split_view = apply_filters( 'show_revisions_split_view', true ); 62 $diff = wp_text_diff( $content_from, $content_to, array( 'show_split_view' => $show_split_view ) ); 62 63 63 64 if ( ! $diff && 'post_title' === $field ) { 64 65 // It's a better user experience to still show the Title, even if it didn't change.