summaryrefslogtreecommitdiffstatshomepage
path: root/src/js/_enqueues/lib/ajax-response.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/_enqueues/lib/ajax-response.js')
-rw-r--r--src/js/_enqueues/lib/ajax-response.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/js/_enqueues/lib/ajax-response.js b/src/js/_enqueues/lib/ajax-response.js
index 659b91e023..38816f3c38 100644
--- a/src/js/_enqueues/lib/ajax-response.js
+++ b/src/js/_enqueues/lib/ajax-response.js
@@ -18,7 +18,7 @@ window.wpAjax = jQuery.extend( {
return r;
},
parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission.
- var parsed = {}, re = jQuery('#' + r).empty(), err = '', successmsg = '';
+ var parsed = {}, re = jQuery('#' + r).empty(), err = '';
if ( x && typeof x === 'object' && x.getElementsByTagName('wp_ajax') ) {
parsed.responses = [];
@@ -27,7 +27,6 @@ window.wpAjax = jQuery.extend( {
var th = jQuery(this), child = jQuery(this.firstChild), response;
response = { action: th.attr('action'), what: child.get(0).nodeName, id: child.attr('id'), oldId: child.attr('old_id'), position: child.attr('position') };
response.data = jQuery( 'response_data', child ).text();
- successmsg += response.data;
response.supplemental = {};
if ( !jQuery( 'supplemental', child ).children().each( function() {
response.supplemental[this.nodeName] = jQuery(this).text();
@@ -47,14 +46,7 @@ window.wpAjax = jQuery.extend( {
} ).length ) { response.errors = false; }
parsed.responses.push( response );
} );
- if ( err.length ) {
- re.html( '<div class="error">' + err + '</div>' );
- wp.a11y.speak( err );
- } else {
- re.html( '<div class="updated notice is-dismissible"><p>' + successmsg + '</p></div>');
- jQuery(document).trigger( 'wp-updates-notice-added' );
- wp.a11y.speak( successmsg );
- }
+ if ( err.length ) { re.html( '<div class="error">' + err + '</div>' ); }
return parsed;
}
if ( isNaN(x) ) { return !re.html('<div class="error"><p>' + x + '</p></div>'); }