mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-25 17:51:27 +01:00
Handle error response in autosave_update_slug(), props nacin, fixes #16975
git-svn-id: http://svn.automattic.com/wordpress/trunk@17565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
66befd1f7e
commit
b8d696b2a6
@ -161,8 +161,10 @@ function autosave_update_slug(post_id) {
|
|||||||
samplepermalinknonce: jQuery('#samplepermalinknonce').val()
|
samplepermalinknonce: jQuery('#samplepermalinknonce').val()
|
||||||
},
|
},
|
||||||
function(data) {
|
function(data) {
|
||||||
jQuery('#edit-slug-box').html(data);
|
if ( data !== '-1' ) {
|
||||||
makeSlugeditClickable();
|
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){};'
|
'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_data( 'autosave', 'group', 1 );
|
||||||
|
|
||||||
$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20101222' );
|
$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20101222' );
|
||||||
|
Loading…
Reference in New Issue
Block a user