Changeset 29192
- Timestamp:
- 07/16/2014 06:33:03 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/autosave.js
r27713 r29192 212 212 result = false; 213 213 214 if ( isSuspended ) {214 if ( isSuspended || ! hasStorage ) { 215 215 return false; 216 216 } … … 400 400 } 401 401 402 // Initialize and run checkPost() on loading the script (before TinyMCE init)403 402 blog_id = typeof window.autosaveL10n !== 'undefined' && window.autosaveL10n.blog_id; 404 403 405 // Check if the browser supports sessionStorage and it's not disabled 406 if ( ! checkStorage() ) { 407 return; 408 } 409 404 // Check if the browser supports sessionStorage and it's not disabled, 405 // then initialize and run checkPost(). 410 406 // Don't run if the post type supports neither 'editor' (textarea#content) nor 'excerpt'. 411 if ( ! blog_id || ( ! $('#content').length && ! $('#excerpt').length ) ) { 412 return; 413 } 414 415 $document.ready( run ); 407 if ( checkStorage() && blog_id && ( $('#content').length || $('#excerpt').length ) ) { 408 $document.ready( run ); 409 } 416 410 417 411 return {
Note: See TracChangeset
for help on using the changeset viewer.