Handle error response in autosave_update_slug(), props nacin, fixes #16975
git-svn-id: https://develop.svn.wordpress.org/trunk@17565 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
43d4c448bf
commit
d400b19f92
@ -161,8 +161,10 @@ function autosave_update_slug(post_id) {
|
||||
samplepermalinknonce: jQuery('#samplepermalinknonce').val()
|
||||
},
|
||||
function(data) {
|
||||
jQuery('#edit-slug-box').html(data);
|
||||
makeSlugeditClickable();
|
||||
if ( data !== '-1' ) {
|
||||
jQuery('#edit-slug-box').html(data);
|
||||
makeSlugeditClickable();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -103,7 +103,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};'
|
||||
) );
|
||||
|
||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20101004' );
|
||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20110327' );
|
||||
$scripts->add_data( 'autosave', 'group', 1 );
|
||||
|
||||
$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20101222' );
|
||||
|
Loading…
Reference in New Issue
Block a user