mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-25 13:44:30 +00:00
Post type support for local autosaves. props azaozz. see #24756.
git-svn-id: https://develop.svn.wordpress.org/trunk@24747 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -524,11 +524,12 @@ wp.autosave.local = {
|
||||
init: function( settings ) {
|
||||
var self = this;
|
||||
|
||||
// Run only on the Add/Edit Post screens and in browsers that have sessionStorage
|
||||
if ( 'post' != window.pagenow || ! this.checkStorage() )
|
||||
// Check if the browser supports sessionStorage and editor.js is loaded
|
||||
if ( ! this.checkStorage() || typeof switchEditors == 'undefined' )
|
||||
return;
|
||||
// editor.js has to be loaded before autosave.js
|
||||
if ( typeof switchEditors == 'undefined' )
|
||||
|
||||
// Don't run if the post type supports neither 'editor' (textarea#content) nor 'excerpt'.
|
||||
if ( ! $('#content').length && ! $('#excerpt').length )
|
||||
return;
|
||||
|
||||
if ( settings )
|
||||
|
||||
Reference in New Issue
Block a user