- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2 lines
5.8 KiB
JavaScript
Executable File
2 lines
5.8 KiB
JavaScript
Executable File
(function(){"use strict";var f={};(function(){f.d=function(a,i){for(var e in i)f.o(i,e)&&!f.o(a,e)&&Object.defineProperty(a,e,{enumerable:!0,get:i[e]})}})(),function(){f.o=function(a,i){return Object.prototype.hasOwnProperty.call(a,i)}}();var v={};f.d(v,{default:function(){return x}});var d=Object(window.WPD).AjaxSearchPro,n=Object(window.WPD).DoMini;let c=d.helpers;d.plugin.liveLoad=function(a,i,e,r,p){let s=a;if(s==="body"||s==="html")return console.log("Ajax Search Pro: Do not use html or body as the live loader selector."),!1;let t=this;ASP.pageHTML!==""&&t.setLiveLoadCache(ASP.pageHTML,a);function _(h){let o=c.Hooks.applyFilters("asp/live_load/raw_data",h,t),L=new DOMParser,S=L.parseFromString(o,"text/html"),u=n(S);if(t.o.statistics&&t.stat_addKeyword(t.o.id,t.n("text").val()),o!==""&&u.length>0&&u.find(s).length>0){o=o.replace(/&asp_force_reset_pagination=1/gmi,""),o=o.replace(/%26asp_force_reset_pagination%3D1/gmi,""),o=o.replace(/&asp_force_reset_pagination=1/gmi,""),c.isSafari()&&(o=o.replace(/srcset/gmi,"nosrcset")),o=c.Hooks.applyFilters("asp_live_load_html",o,t.o.id,t.o.iid),u=n(L.parseFromString(o,"text/html"));let g=u.find(s).get(0);g=c.Hooks.applyFilters("asp/live_load/replacement_node",g,t,l.get(0),o),g!=null&&l.get(0).parentNode.replaceChild(g,l.get(0)),l=n(s).first(),e&&(document.title=S.title,history.pushState({},null,i)),n(s).first().find(".woocommerce-ordering select.orderby").on("change",function(){n(this).closest("form").length>0&&n(this).closest("form").get(0).submit()}),t.o.highlight&&l.highlight(t.n("text").val().replace(/["']/g,"").split(" "),{element:"span",className:"asp_single_highlighted_"+t.o.id,wordsOnly:!!t.o.highlightWholewords}),t.addHighlightString(n(s).find("a")),c.Hooks.applyFilters("asp/live_load/finished",i,t,s,l.get(0)),ASP.initialize(),t.lastSuccesfulSearch=n("form",t.n("searchsettings")).serialize()+t.n("text").val().trim(),t.lastSearchData=o,t.setLiveLoadCache(h,a)}t.n("s").trigger("asp_search_end",[t.o.id,t.o.iid,t.n("text").val(),o],!0,!0),t.gaEvent?.("search_end",{results_count:"unknown"}),t.hideLoader(),l.css("opacity",1),t.searching=!1,t.n("text").val()!==""&&t.n("proclose").css({display:"block"})}e=typeof e>"u"?!0:e,r=typeof r>"u"?!0:r;let m=t.getLiveLoadAltSelectors();if(s!=="#main"&&m.unshift("#main"),n(s).length<1){for(const h of m)if(n(h).length>0){s=h;break}if(n(s).length<1)return console.log("Ajax Search Pro: The live search selector does not exist on the page."),!1}s=c.Hooks.applyFilters("asp/live_load/selector",s,this);let l=n(s).first();t.searchAbort(),l.css("opacity",.4),i=c.Hooks.applyFilters("asp/live_load/url",i,t,s,l.get(0)),c.Hooks.applyFilters("asp/live_load/start",i,t,s,l.get(0)),!r&&t.n("searchsettings").find("input[name=filters_initial]").val()==="1"&&t.n("text").val()===""?window.WPD.intervalUntilExecute(function(){_(ASP.pageHTML)},function(){return ASP.pageHTML!==""}):typeof p<"u"?_(p.html):(t.searching=!0,t.post=n.fn.ajax({url:i,method:"GET",success:function(h){_(h),t.isAutoP=!1},dataType:"html",fail:function(h){l.css("opacity",1),!h.aborted&&(l.html("This request has failed. Please check your connection."),t.hideLoader(),t.searching=!1,t.n("proclose").css({display:"block"}),t.isAutoP=!1)}}))},d.plugin.getLiveLoadAltSelectors=function(){return[".search-content","#content #posts-container","#content","#Content","div[role=main]","main[role=main]","div.theme-content","div.td-ss-main-content","main#page-content","main.l-content","#primary","#main-content",".main-content",".search section .bde-post-loop",".archive section .bde-post-loop",".search section .bde-post-list",".archive section .bde-post-list","main .wp-block-query","main"]},d.plugin.usingLiveLoader=function(){const a=this;if(a._usingLiveLoader!==void 0)return a._usingLiveLoader;const i=a.o,e="asp_es_"+i.id,r=this.getLiveLoadAltSelectors().join(",");if(document.getElementsByClassName(e).length)return a._usingLiveLoader=!0;const p=["resPage","wooShop","cptArchive","taxArchive"];return a._usingLiveLoader=p.some(s=>{const t=i[s];return t.useAjax&&(document.querySelector(t.selector)||r&&document.querySelector(r))}),a._usingLiveLoader},d.plugin.getLiveURLbyBaseLocation=function(a){let i=this,e="asp_ls="+c.nicePhrase(i.n("text").val()),r="&";a.indexOf("?")===-1&&(r="?");let p=a+r+e+"&asp_active=1&asp_force_reset_pagination=1&p_asid="+i.o.id+"&p_asp_data=1&"+n("form",i.n("searchsettings")).serialize();return p=p.replace("?&","?"),p=p.replace("&&","&"),p},d.plugin.getCurrentLiveURL=function(){const a=this,i=new URL(window.location.href);let e;return i.hash="",e=i.href,e=e.replace(/([?&])query-\w+-page=\d+/,"$1"),e=e.indexOf("asp_ls=")>-1?e.slice(0,e.indexOf("asp_ls=")):e,e=e.indexOf("asp_ls&")>-1?e.slice(0,e.indexOf("asp_ls&")):e,e=e.indexOf("p_asid=")>-1?e.slice(0,e.indexOf("p_asid=")):e,e=e.indexOf("asp_")>-1?e.slice(0,e.indexOf("asp_")):e,a.getLiveURLbyBaseLocation(e)},d.plugin.initLiveLoaderPopState=function(){let a=this;a.liveLoadCache=[],window.addEventListener("popstate",()=>{let i=a.getLiveLoadCache();i!==!1&&(a.n("text").val(i.phrase),c.formData(n("form",a.n("searchsettings")),i.settings),a.resetNoUISliderFilters(),a.liveLoad(i.selector,document.location.href,!1,!1,i))}),ASP.pageHTML===""&&typeof ASP._ajax_page_html>"u"&&(ASP._ajax_page_html=!0,n.fn.ajax({url:a.currentPageURL,method:"GET",success:function(i){ASP.pageHTML=i},dataType:"html"}))},d.plugin.setLiveLoadCache=function(a,i){let e=this;e.liveLoadCache.filter(r=>r.href===document.location.href).length===0&&e.liveLoadCache.push({href:a===ASP.pageHTML?e.currentPageURL:document.location.href,phrase:a===ASP.pageHTML?"":e.n("text").val(),selector:i,html:a,settings:a===ASP.pageHTML?e.originalFormData:c.formData(n("form",e.n("searchsettings")))})},d.plugin.getLiveLoadCache=function(){let i=this.liveLoadCache.filter(e=>e.href===document.location.href);return i.length>0?i[0]:!1};var y=null,x=d;Object(window.WPD).AjaxSearchPro=v.default})();
|