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:
Andrew Nacin 2014-03-25 16:46:22 +00:00
parent fbe0b3e5ac
commit 21b0ca8462

View File

@ -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;
}