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:
parent
58191c0b6b
commit
24917dfbc8
|
@ -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