summaryrefslogtreecommitdiffstatshomepage
path: root/src/js/_enqueues/lib/ajax-response.js
diff options
context:
space:
mode:
authorJoe Dolson <joedolson@git.wordpress.org>2021-11-15 22:16:32 +0000
committerJoe Dolson <joedolson@git.wordpress.org>2021-11-15 22:16:32 +0000
commit706018e08fd091e0958d9f1b04d411efc25abf8b (patch)
tree2f447fef8ff97190b05983d127d924accc08cdce /src/js/_enqueues/lib/ajax-response.js
parentf58d8872b3ae0e7b23d297955d192f7f612088e5 (diff)
downloadwordpress-706018e08fd091e0958d9f1b04d411efc25abf8b.tar.gz
wordpress-706018e08fd091e0958d9f1b04d411efc25abf8b.zip
Commit Standards: Revert [52168] to correct commit message.
Used incorrect commit message.. Follow up to [52168]. See #42937. git-svn-id: https://develop.svn.wordpress.org/trunk@52169 602fd350-edb4-49c9-b593-d223f7449a82
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>'); }