Make WordPress Core

Changeset 23994


Ignore:
Timestamp:
04/15/2013 06:40:17 PM (12 years ago)
Author:
ocean90
Message:

Revisions UI: Remove the "To:" prefix from the header when viewing a single revision. Also prefix a revision field with a label.

props SergeyBiryukov, adamsilverstein, faishal. fixes #23903.

Location:
trunk/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-classic.css

    r23901 r23994  
    14941494.revision-tick.loading-false {
    14951495    background-color: #aaa;
     1496}
     1497
     1498.diff-label {
     1499    color: #666;
    14961500}
    14971501
  • trunk/wp-admin/css/colors-fresh.css

    r23901 r23994  
    13971397.revision-tick.loading-false {
    13981398    background-color: #aaa;
     1399}
     1400
     1401.diff-label {
     1402    color: #666;
    13991403}
    14001404
  • trunk/wp-admin/css/wp-admin.css

    r23984 r23994  
    36133613}
    36143614
     3615#diff-title-to strong {
     3616    display: none;
     3617}
     3618
     3619.comparing-two-revisions #diff-title-to strong {
     3620    display: inline;
     3621}
     3622
    36153623.diff-slider-ticks-wrapper {
    36163624    margin: 0 auto;
     
    36243632}
    36253633
     3634.diff-label {
     3635    margin: 20px 0 5px;
     3636    padding-left: 3px;
     3637    font-size: 13px;
     3638}
     3639
    36263640.diff-header {
    36273641    height: 35px;
     
    36433657.diff-title img {
    36443658    vertical-align: middle;
     3659    margin-left: 5px;
    36453660}
    36463661
     
    36493664}
    36503665
    3651 .diff-col-titles {
    3652     font-size: 16px;
    3653     width: 100%;
    3654     margin: 20px 0 10px;
    3655 }
    3656 
    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;
     3666#diff-table {
     3667    margin-top: 20px;
    36773668}
    36783669
  • trunk/wp-admin/includes/ajax-actions.php

    r23982 r23994  
    21362136        $content = '';
    21372137        //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 ) {
    21392139            $left_content = apply_filters( "_wp_post_revision_field_$field", $left_revision->$field, $field, $left_revision, 'left' );
    21402140            $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field, $right_revision, 'right' );
     
    21502150            $diff = wp_text_diff_with_count( ( 0 == $compare_to ) ? '' : $left_content, $right_content, $args );
    21512151
    2152             if ( isset( $diff[ 'html' ] ) )
     2152            if ( isset( $diff[ 'html' ] ) ) {
     2153                $content .= sprintf( '<div class="diff-label">%s</div>', $field_value );
    21532154                $content .= $diff[ 'html' ];
     2155            }
    21542156
    21552157            if ( isset( $diff[ 'lines_added' ] ) )
  • trunk/wp-admin/revision.php

    r23934 r23994  
    142142    </div>
    143143
    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>
    151145</script>
    152146
Note: See TracChangeset for help on using the changeset viewer.