Back compat for overriding window.autosave.

props azaozz.
fixes #25272.

Built from https://develop.svn.wordpress.org/trunk@27713


git-svn-id: http://core.svn.wordpress.org/trunk@27552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-03-25 16:47:15 +00:00
parent dd70d0e30b
commit 07f8c619bd
2 changed files with 7 additions and 4 deletions

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

File diff suppressed because one or more lines are too long