Make WordPress Core

Ticket #24756: 24756.patch

File 24756.patch, 741 bytes (added by azaozz, 12 years ago)

Enable on all screens where autosave.js is loaded

  • wp-includes/js/autosave.js

     
    520520        init: function( settings ) {
    521521                var self = this;
    522522
    523                 // Run only on the Add/Edit Post screens and in browsers that have sessionStorage
    524                 if ( 'post' != window.pagenow || ! this.checkStorage() )
     523                // Check if the browser supports sessionStorage and editor.js is loaded
     524                if ( ! this.checkStorage() || typeof switchEditors == 'undefined' )
    525525                        return;
    526                 // editor.js has to be loaded before autosave.js
    527                 if ( typeof switchEditors == 'undefined' )
    528                         return;
    529526
    530527                if ( settings )
    531528                        $.extend( this, settings );