WordPress.org

Make WordPress Core

Ticket #19932: 19932.1.patch

File 19932.1.patch, 1.2 KB (added by ethitter, 7 years ago)
  • wp-admin/revision.php

     
    169169$identical = true;
    170170foreach ( _wp_post_revision_fields() as $field => $field_title ) :
    171171        if ( 'diff' == $action ) {
    172                 $left_content = apply_filters( "_wp_post_revision_field_$field", $left_revision->$field, $field );
    173                 $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field );
     172                $left_content = apply_filters( "_wp_post_revision_field_$field", $left_revision->$field, $field, $left_revision, 'left' );
     173                $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field, $right_revision, 'right' );
    174174                if ( !$content = wp_text_diff( $left_content, $right_content ) )
    175175                        continue; // There is no difference between left and right
    176176                $identical = false;
    177177        } else {
    178178                add_filter( "_wp_post_revision_field_$field", 'htmlspecialchars' );
    179                 $content = apply_filters( "_wp_post_revision_field_$field", $revision->$field, $field );
     179                $content = apply_filters( "_wp_post_revision_field_$field", $revision->$field, $field, $revision, '' );
    180180        }
    181181        ?>
    182182