diff --git a/wp-admin/css/colors-classic.css b/wp-admin/css/colors-classic.css index a8f950fd68..085c522035 100644 --- a/wp-admin/css/colors-classic.css +++ b/wp-admin/css/colors-classic.css @@ -1495,6 +1495,10 @@ table.diff .diff-addedline ins { background-color: #aaa; } +.diff-label { + color: #666; +} + /* jQuery UI Slider */ .wp-slider.ui-slider { border-color: #d1e5ee; diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index 1335956172..02b3e1d31a 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -1398,6 +1398,10 @@ table.diff .diff-addedline ins { background-color: #aaa; } +.diff-label { + color: #666; +} + body .ui-tooltip { border-color: #d7d7d7; background-color: #fff; diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css index f695a652c8..9aeb62f9a2 100644 --- a/wp-admin/css/wp-admin.css +++ b/wp-admin/css/wp-admin.css @@ -3612,6 +3612,14 @@ table.diff .diff-addedline ins { width: 95%; } +#diff-title-to strong { + display: none; +} + +.comparing-two-revisions #diff-title-to strong { + display: inline; +} + .diff-slider-ticks-wrapper { margin: 0 auto; text-align: center; @@ -3623,6 +3631,12 @@ table.diff .diff-addedline ins { margin-top: 20px; } +.diff-label { + margin: 20px 0 5px; + padding-left: 3px; + font-size: 13px; +} + .diff-header { height: 35px; line-height: 35px; @@ -3642,38 +3656,15 @@ table.diff .diff-addedline ins { .diff-title img { vertical-align: middle; + margin-left: 5px; } #restore-revision { margin-left: 10px; } -.diff-col-titles { - font-size: 16px; - width: 100%; - margin: 20px 0 10px; -} - -.diff-col-title-added, -.diff-col-title-removed { - width: auto; - text-align: left; - float: left; - width: 48%; -} - -.diff-col-title-added span, -.diff-col-title-removed span { - padding: .5em; -} - -.diff-col-title-added { - float: right; - color: #00a100; -} - -.diff-col-title-removed { - color: #d2281f; +#diff-table { + margin-top: 20px; } .comparing-two-revisions #diff-previous-revision, diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index b379959d64..5d9aceff50 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -2135,7 +2135,7 @@ function wp_ajax_revisions_data() { $lines_added = $lines_deleted = 0; $content = ''; //compare from left to right, passed from application - foreach ( array_keys( _wp_post_revision_fields() ) as $field ) { + foreach ( _wp_post_revision_fields() as $field => $field_value ) { $left_content = apply_filters( "_wp_post_revision_field_$field", $left_revision->$field, $field, $left_revision, 'left' ); $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field, $right_revision, 'right' ); @@ -2149,8 +2149,10 @@ function wp_ajax_revisions_data() { // compare_to == 0 means first revision, so compare to a blank field to show whats changed $diff = wp_text_diff_with_count( ( 0 == $compare_to ) ? '' : $left_content, $right_content, $args ); - if ( isset( $diff[ 'html' ] ) ) + if ( isset( $diff[ 'html' ] ) ) { + $content .= sprintf( '
%s
', $field_value ); $content .= $diff[ 'html' ]; + } if ( isset( $diff[ 'lines_added' ] ) ) $lines_added = $lines_added + $diff[ 'lines_added' ]; diff --git a/wp-admin/revision.php b/wp-admin/revision.php index d1ade5e9b1..fff621d92f 100644 --- a/wp-admin/revision.php +++ b/wp-admin/revision.php @@ -141,13 +141,7 @@ require_once( './admin-header.php' ); -
-
-
-
-
- -
{{{ data.diff }}}
+
{{{ data.diff }}}