Make WordPress Core


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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' ] ) )
Note: See TracChangeset for help on using the changeset viewer.