Make WordPress Core

Changeset 23705


Ignore:
Timestamp:
03/15/2013 06:15:14 AM (14 years ago)
Author:
azaozz
Message:

Local autosave: remove the temp cookie after first use. Prevents false negative if the browser crashes. Add some temp logging to aid testing. See #23220

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/autosave.js

    r23703 r23705  
    488488                result = this.setData( post_data );
    489489
     490                // temp logging
     491                if ( this.debug )
     492                        console.log( 'saved, post content = %s', post_data.content );
     493
    490494                if ( result )
    491495                        this.lastsaveddata = post_data.post_title + ': ' + post_data.content;
    … …  
    584588                        return;
    585589
     590                if ( cookie )
     591                        wpCookies.remove( 'wp-saving-post-' + post_id );
     592
    586593                // There is a newer autosave. Don't show two "restore" notices at the same time.
    587594                if ( $('#has-newer-autosave').length )
    588595                        return;
     596
     597                // temp logging
     598                if ( typeof console != 'undefined' )
     599                        console.log( 'checkPost, post content = %s', post_data.content );
    589600
    590601                if ( cookie == 'saved' ) {
Note: See TracChangeset for help on using the changeset viewer.