Ticket #23903: 23903.3.diff
File 23903.3.diff, 3.3 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/ajax-actions.php
2135 2135 $lines_added = $lines_deleted = 0; 2136 2136 $content = ''; 2137 2137 //compare from left to right, passed from application 2138 foreach ( array_keys( _wp_post_revision_fields() ) as $field) {2138 foreach ( _wp_post_revision_fields() as $field => $field_value ) { 2139 2139 $left_content = apply_filters( "_wp_post_revision_field_$field", $left_revision->$field, $field, $left_revision, 'left' ); 2140 2140 $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field, $right_revision, 'right' ); 2141 2141 … … 2149 2149 // compare_to == 0 means first revision, so compare to a blank field to show whats changed 2150 2150 $diff = wp_text_diff_with_count( ( 0 == $compare_to ) ? '' : $left_content, $right_content, $args ); 2151 2151 2152 if ( isset( $diff[ 'html' ] ) ) 2152 if ( isset( $diff[ 'html' ] ) ) { 2153 $content .= sprintf( '<div class="diff-label">%s</div>', $field_value ); 2153 2154 $content .= $diff[ 'html' ]; 2155 } 2154 2156 2155 2157 if ( isset( $diff[ 'lines_added' ] ) ) 2156 2158 $lines_added = $lines_added + $diff[ 'lines_added' ]; -
wp-admin/css/wp-admin.css
3612 3612 width: 95%; 3613 3613 } 3614 3614 3615 #diff-title-to strong { 3616 display: none; 3617 } 3618 3619 .comparing-two-revisions #diff-title-to strong { 3620 display: inline; 3621 } 3622 3615 3623 .diff-slider-ticks-wrapper { 3616 3624 margin: 0 auto; 3617 3625 text-align: center; … … 3623 3631 margin-top: 20px; 3624 3632 } 3625 3633 3634 .diff-label { 3635 margin: 20px 0 5px; 3636 padding-left: 3px; 3637 font-size: 13px; 3638 color: #666 3639 } 3640 3626 3641 .diff-header { 3627 3642 height: 35px; 3628 3643 line-height: 35px; … … 3642 3657 3643 3658 .diff-title img { 3644 3659 vertical-align: middle; 3660 margin-left: 5px; 3645 3661 } 3646 3662 3647 3663 #restore-revision { 3648 3664 margin-left: 10px; 3649 3665 } 3650 3666 3651 .diff-col-titles { 3652 font-size: 16px; 3653 width: 100%; 3654 margin: 20px 0 10px; 3667 #diff-table { 3668 margin-top: 20px; 3655 3669 } 3656 3670 3657 .diff-col-title-added,3658 .diff-col-title-removed {3659 width: auto;3660 text-align: left;3661 float: left;3662 width: 48%;3663 }3664 3665 .diff-col-title-added span,3666 .diff-col-title-removed span {3667 padding: .5em;3668 }3669 3670 .diff-col-title-added {3671 float: right;3672 color: #00a100;3673 }3674 3675 .diff-col-title-removed {3676 color: #d2281f;3677 }3678 3679 3671 .comparing-two-revisions #diff-previous-revision, 3680 3672 .comparing-two-revisions #diff-next-revision, 3681 3673 #diff-title-from-current-version, -
wp-admin/revision.php
141 141 <input type="button" id="restore-revision" class="button button-primary" data-restore-link="{{{ data.restoreLink }}}" value="<?php esc_attr_e( 'Restore This Revision' )?>" /> 142 142 </div> 143 143 144 <div class="diff-col-titles"> 145 <div class="diff-col-title-removed"><span><?php _e( 'Removed -' ); ?></span></div> 146 <div class="diff-col-title-added"><span><?php _e( 'Added +' ); ?></span></div> 147 <div class="clear"></div> 148 </div> 149 150 <div>{{{ data.diff }}}</div> 144 <div id="diff-table">{{{ data.diff }}}</div> 151 145 </script> 152 146 153 147 <script id="tmpl-revision-interact" type="text/html">