Make WordPress Core

Ticket #24756: 24756-2.patch

File 24756-2.patch, 711 bytes (added by azaozz, 11 years ago)

Enable on Add/Edit Post and Add/Edit Page only

  • 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                // Run only on the Add/Edit Post/Page screens and in browsers that have sessionStorage
     524                if ( ( 'post' != window.pagenow && 'page' != window.pagenow ) || ! this.checkStorage() )
    525525                        return;
    526526                // editor.js has to be loaded before autosave.js
    527527                if ( typeof switchEditors == 'undefined' )