mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Post type support for local autosaves. props azaozz. see #24756.
git-svn-id: http://core.svn.wordpress.org/trunk@24747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c1dbc01850
commit
4c17aa3707
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user