Prevent error in autosave for CPTs without title or editor, props sorich87, fixes #18227

git-svn-id: http://svn.automattic.com/wordpress/trunk@19476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-11-29 18:06:56 +00:00
parent 58191c0b6b
commit 24917dfbc8
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 );