(function($, document, window) { if (!window['wordfenceAJAXWatcher']) { window['wordfenceAJAXWatcher'] = { blockWarningOpen: false, init: function() { $(document).ajaxError(function (event, jqXHR, ajaxSettings, thrownError) { if (wordfenceAJAXWatcher.blockWarningOpen) { return; } if (jqXHR.responseJSON) { //Do nothing } else { //Match nonce in response to verify it's our error page, which will be in the form var nonceRegex = //; var nonceMatches = nonceRegex.exec(jqXHR.responseText); if (nonceMatches && nonceMatches[1] == WFAJAXWatcherVars.nonce) { var requestURL = ajaxSettings.url; if (requestURL.length > 63) { requestURL = requestURL.substring(0, 30) + '...' + requestURL.substring(requestURL.length - 30); } var requestURLEscaped = $('
').text(requestURL).html(); var responseDOM = $.parseHTML(jqXHR.responseText); var formAction = $(responseDOM).filter('#whitelist-form').add($(responseDOM).find('#whitelist-form')).attr('action'); var inputs = $(responseDOM).filter('input[name]').add($(responseDOM).find('input[name]')); var queryParams = {}; for (var i = 0; i < inputs.length; i++) { queryParams[inputs[i].name] = inputs[i].value; } if (!(typeof formAction === "string")) { //Only progress if it's our plugin doing the blocking return; } wordfenceAJAXWatcher.blockWarningOpen = true; $.wordfenceBox({ closeButton: false, width: '400px', html: "

Background Request Blocked

Wordfence Firewall blocked a background request to WordPress for the URL " + requestURLEscaped + ". If this occurred as a result of an intentional action, you may consider whitelisting the request to allow it in the future.

Whitelist this action Dismiss

", onComplete: function() { $('#background-block-dismiss').click(function(event) { event.preventDefault(); event.stopPropagation(); $.wordfenceBox.close(); }); $('#background-block-whitelist').click(function(event) { event.preventDefault(); event.stopPropagation(); if (confirm('Are you sure you want to whitelist this action?')) { $.ajax({ method: 'POST', url: formAction, data: queryParams, global: false, success: function() { alert('The request has been whitelisted. Please try it again.'); $.wordfenceBox.close(); }, error: function() { alert('An error occurred when adding the request to the whitelist.'); $.wordfenceBox.close(); } }); } }); }, onClosed: function() { wordfenceAJAXWatcher.blockWarningOpen = false; } }); } } }); } } } $(function() { wordfenceAJAXWatcher.init(); }); }(jQuery, document, window)); !function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-wfbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+tt).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),at.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(st,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(et),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),at.one(rt,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&at.one(rt,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?P.html(_.get("close")).appendTo(b):P.appendTo("
"),w()}}function p(){x||(V=!1,E=t(i),x=n(st).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(st,"Overlay").hide(),L=t([n(st,"LoadingOverlay")[0],n(st,"LoadingGraphic")[0]]),y=n(st,"Wrapper"),b=n(st,"Content").append(F=n(st,"Title"),R=n(st,"Current"),K=t('