WordPress.org

Make WordPress Core

Ticket #19932: revisions-whole.diff

File revisions-whole.diff, 938 bytes (added by pollett, 7 years ago)

Pass complete revision to revision field filter

  • 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 );
     173   $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field, $right_revision );
    174174   if ( !$content = wp_text_diff( $left_content, $right_content ) )
    175175     continue; // There is no difference between left and right
    176176   $identical = false;