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 */
|
/* global tinymce, wpCookies, autosaveL10n, switchEditors */
|
||||||
// Back-compat: prevent fatal errors
|
// Back-compat
|
||||||
window.autosave = function(){};
|
window.autosave = function() {
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
( function( $, window ) {
|
( function( $, window ) {
|
||||||
function autosave() {
|
function autosave() {
|
||||||
@ -489,7 +491,8 @@ window.autosave = function(){};
|
|||||||
function save() {
|
function save() {
|
||||||
var postData, compareString;
|
var postData, compareString;
|
||||||
|
|
||||||
if ( isSuspended || _blockSave ) {
|
// window.autosave() used for back-compat
|
||||||
|
if ( isSuspended || _blockSave || ! window.autosave() ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user