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:
Andrew Ozz 2011-11-29 18:06:56 +00:00
parent 9270d2e101
commit b8a1940ac7
3 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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 );