Bail from AJAX success callback if wp_ajax_add_tag() returns errors. Props solarissmoke. Fixes #20086.
git-svn-id: https://develop.svn.wordpress.org/trunk@20086 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
762b3bc702
commit
b80111d67c
@ -33,9 +33,9 @@ jQuery(document).ready(function($) {
|
||||
return false;
|
||||
|
||||
$.post(ajaxurl, $('#addtag').serialize(), function(r){
|
||||
$('#ajax-response').empty();
|
||||
$('#ajax-response').empty();
|
||||
var res = wpAjax.parseAjaxResponse(r, 'ajax-response');
|
||||
if ( ! res )
|
||||
if ( ! res || res.errors )
|
||||
return;
|
||||
|
||||
var parent = form.find('select#parent').val();
|
||||
|
Loading…
Reference in New Issue
Block a user