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:
parent
dd70d0e30b
commit
07f8c619bd
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue