diff --git src/js/_enqueues/lib/ajax-response.js src/js/_enqueues/lib/ajax-response.js
index b764823742..8ff79b6589 100644
|
|
window.wpAjax = jQuery.extend( { |
27 | 27 | var th = jQuery(this), child = jQuery(this.firstChild), response; |
28 | 28 | response = { action: th.attr('action'), what: child.get(0).nodeName, id: child.attr('id'), oldId: child.attr('old_id'), position: child.attr('position') }; |
29 | 29 | response.data = jQuery( 'response_data', child ).text(); |
30 | | if ( jQuery( 'body' ).hasClass( 'edit-tags-php' ) ) { |
31 | | successmsg += response.data; |
32 | | } |
33 | 30 | response.supplemental = {}; |
34 | 31 | if ( !jQuery( 'supplemental', child ).children().each( function() { |
| 32 | |
| 33 | if ( this.nodeName === 'message' ) { |
| 34 | successmsg += jQuery(this).text(); |
| 35 | return |
| 36 | } |
| 37 | |
35 | 38 | response.supplemental[this.nodeName] = jQuery(this).text(); |
36 | 39 | } ).length ) { response.supplemental = false; } |
37 | 40 | response.errors = []; |
diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
index b81710ddef..736c59c5d3 100644
|
|
function wp_ajax_add_tag() { |
1114 | 1114 | $x->add( |
1115 | 1115 | array( |
1116 | 1116 | 'what' => 'taxonomy', |
1117 | | 'data' => $message, |
1118 | | 'supplemental' => compact( 'parents', 'noparents' ), |
| 1117 | 'supplemental' => array( |
| 1118 | 'parents' => $parents, |
| 1119 | 'noparents' => $noparents, |
| 1120 | 'message' => $message |
| 1121 | ), |
1119 | 1122 | ) |
1120 | 1123 | ); |
1121 | 1124 | |