Make WordPress Core


Ignore:
Timestamp:
10/23/2008 08:03:16 PM (17 years ago)
Author:
ryan
Message:

Introduce normalize_whitespace(). Use it instead of wp_text_diff() when checking for identical autosave revisions. Props tellyworth. fixes #7691

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r9291 r9302  
    4646    if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) {
    4747        foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) {
    48             if ( wp_text_diff( $autosave->$autosave_field, $post->$autosave_field ) ) {
     48            if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) {
    4949                $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) );
    5050                break;
Note: See TracChangeset for help on using the changeset viewer.