mirror of
https://github.com/WordPress/WordPress.git
synced 2025-04-01 09:26:10 +02:00
Bail from AJAX success callback if wp_ajax_add_tag() returns errors. Props solarissmoke. Fixes #20086.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1729a14278
commit
50fea9b10f
@ -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