Make WordPress Core

Ticket #7392: 7392.5.diff

File 7392.5.diff, 1.0 KB (added by azaozz, 12 years ago)
  • wp-includes/js/autosave.js

     
    77                        if ( 'content' == editor.id ) {
    88                                editor.onLoad.add( function() {
    99                                        editor.save();
    10                                         if ( typeof switchEditors != 'undefined' ) {
    11                                                 autosaveLast = wp.autosave.getCompareString({
    12                                                         post_title : $('#title').val() || '',
    13                                                         content : switchEditors.pre_wpautop( $('#content').val() ) || '',
    14                                                         excerpt : $('#excerpt').val() || '',
    15                                                 });
    16                                         } else {
    17                                                 autosaveLast = wp.autosave.getCompareString();
    18                                         }
     10                                        autosaveLast = wp.autosave.getCompareString();
    1911                                });
    2012                        }
    2113                });
    22         } else {
    23                 autosaveLast = wp.autosave.getCompareString();
    2414        }
    2515
     16        autosaveLast = wp.autosave.getCompareString();
    2617        autosavePeriodical = $.schedule({time: autosaveL10n.autosaveInterval * 1000, func: function() { autosave(); }, repeat: true, protect: true});
    2718
    2819        //Disable autosave after the form has been submitted