WordPress.org

Make WordPress Core

Ticket #10754: 10754.diff

File 10754.diff, 574 bytes (added by sivel, 5 years ago)

returns false early on in the autosave.js file to keep the autosave schedule from being registered for AUTOSAVE_INTERVAL <= 0

  • wp-includes/js/autosave.dev.js

     
    33jQuery(document).ready( function($) { 
    44        var dotabkey = true; 
    55 
     6        if ( autosaveL10n.autosaveInterval <= 0 ) { 
     7                return false; 
     8        } 
     9 
    610        autosaveLast = $('#post #title').val() + $('#post #content').val(); 
    711        autosavePeriodical = $.schedule({time: autosaveL10n.autosaveInterval * 1000, func: function() { autosave(); }, repeat: true, protect: true}); 
    812