WordPress.org

Make WordPress Core

Ticket #19932: revisions.patch

File revisions.patch, 946 bytes (added by pollett, 8 years ago)

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