Back compat for overriding window.autosave.
props azaozz. fixes #25272. git-svn-id: https://develop.svn.wordpress.org/trunk@27713 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fbe0b3e5ac
commit
21b0ca8462
@ -1,6 +1,8 @@
|
||||
/* global tinymce, wpCookies, autosaveL10n, switchEditors */
|
||||
// Back-compat: prevent fatal errors
|
||||
window.autosave = function(){};
|
||||
// Back-compat
|
||||
window.autosave = function() {
|
||||
return true;
|
||||
};
|
||||
|
||||
( function( $, window ) {
|
||||
function autosave() {
|
||||
@ -489,7 +491,8 @@ window.autosave = function(){};
|
||||
function save() {
|
||||
var postData, compareString;
|
||||
|
||||
if ( isSuspended || _blockSave ) {
|
||||
// window.autosave() used for back-compat
|
||||
if ( isSuspended || _blockSave || ! window.autosave() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user