Make WordPress Core

Changeset 27713


Ignore:
Timestamp:
03/25/2014 04:46:22 PM (10 years ago)
Author:
nacin
Message:

Back compat for overriding window.autosave.

props azaozz.
fixes #25272.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/autosave.js

    r27092 r27713  
    11/* global tinymce, wpCookies, autosaveL10n, switchEditors */
    2 // Back-compat: prevent fatal errors
    3 window.autosave = function(){};
     2// Back-compat
     3window.autosave = function() {
     4    return true;
     5};
    46
    57( function( $, window ) {
     
    490492                var postData, compareString;
    491493
    492                 if ( isSuspended || _blockSave ) {
     494                // window.autosave() used for back-compat
     495                if ( isSuspended || _blockSave || ! window.autosave() ) {
    493496                    return false;
    494497                }
Note: See TracChangeset for help on using the changeset viewer.