mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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 */
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
2
wp-includes/js/autosave.min.js
vendored
2
wp-includes/js/autosave.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user