Prevent error in autosave for CPTs without title or editor, props sorich87, fixes #18227
git-svn-id: https://develop.svn.wordpress.org/trunk@19476 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9270d2e101
commit
b8a1940ac7
@ -283,11 +283,11 @@ autosave = function() {
|
||||
}
|
||||
|
||||
if ( fullscreen && fullscreen.settings.visible ) {
|
||||
post_data["post_title"] = jQuery('#wp-fullscreen-title').val();
|
||||
post_data["content"] = jQuery("#wp_mce_fullscreen").val();
|
||||
post_data["post_title"] = jQuery('#wp-fullscreen-title').val() || '';
|
||||
post_data["content"] = jQuery("#wp_mce_fullscreen").val() || '';
|
||||
} else {
|
||||
post_data["post_title"] = jQuery("#title").val()
|
||||
post_data["content"] = jQuery("#content").val();
|
||||
post_data["post_title"] = jQuery("#title").val() || '';
|
||||
post_data["content"] = jQuery("#content").val() || '';
|
||||
}
|
||||
|
||||
if ( jQuery('#post_name').val() )
|
||||
|
File diff suppressed because one or more lines are too long
@ -101,7 +101,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
'dismiss' => __('Dismiss'),
|
||||
) );
|
||||
|
||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20111115', 1 );
|
||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20111129', 1 );
|
||||
|
||||
$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20110521', 1 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user