--- a/wp/wp-includes/js/wp-ajax-response.js Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-includes/js/wp-ajax-response.js Tue Dec 15 13:49:49 2020 +0100
@@ -17,10 +17,10 @@
}
return r;
},
- parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission
+ parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission.
var parsed = {}, re = jQuery('#' + r).empty(), err = '';
- if ( x && typeof x == 'object' && x.getElementsByTagName('wp_ajax') ) {
+ if ( x && typeof x === 'object' && x.getElementsByTagName('wp_ajax') ) {
parsed.responses = [];
parsed.errors = false;
jQuery('response', x).each( function() {
@@ -51,7 +51,7 @@
}
if ( isNaN(x) ) { return !re.html('<div class="error"><p>' + x + '</p></div>'); }
x = parseInt(x,10);
- if ( -1 == x ) { return !re.html('<div class="error"><p>' + wpAjax.noPerm + '</p></div>'); }
+ if ( -1 === x ) { return !re.html('<div class="error"><p>' + wpAjax.noPerm + '</p></div>'); }
else if ( 0 === x ) { return !re.html('<div class="error"><p>' + wpAjax.broken + '</p></div>'); }
return true;
},
@@ -64,7 +64,7 @@
}
}, wpAjax || { noPerm: 'Sorry, you are not allowed to do that.', broken: 'Something went wrong.' } );
-// Basic form validation
+// Basic form validation.
jQuery(document).ready( function($){
$('form.validate').submit( function() { return wpAjax.validateForm( $(this) ); } );
});