diff --git a/src/js/_enqueues/lib/ajax-response.js b/src/js/_enqueues/lib/ajax-response.js index 659b91e023..b764823742 100644 --- a/src/js/_enqueues/lib/ajax-response.js +++ b/src/js/_enqueues/lib/ajax-response.js @@ -27,7 +27,9 @@ 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; + if ( jQuery( 'body' ).hasClass( 'edit-tags-php' ) ) { + successmsg += response.data; + } response.supplemental = {}; if ( !jQuery( 'supplemental', child ).children().each( function() { response.supplemental[this.nodeName] = jQuery(this).text(); @@ -50,7 +52,7 @@ window.wpAjax = jQuery.extend( { if ( err.length ) { re.html( '
' + err + '
' ); wp.a11y.speak( err ); - } else { + } else if ( successmsg.length ) { re.html( '

' + successmsg + '

'); jQuery(document).trigger( 'wp-updates-notice-added' ); wp.a11y.speak( successmsg );