问题标签 [facetwp]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1506 浏览

php - 在 FacetWP 中排序价格

在 FacetWP 插件(用于 Wordpress)中,我想在“价格”之后对结果进行排序,所以我添加了一个新的自定义过滤器,在他们的文档中进行了描述。目前,排序结果如下所示:

  1. 4.450 欧元</li>
  2. 399 欧元</li>
  3. 3.990 欧元</li>

我认为,代码无法识别最后一个零值。这是我的代码:

已经尝试过“usort”功能和替代的“price_raw_short”值(由 mobile.de 提供),但没有任何效果。

0 投票
2 回答
713 浏览

wordpress - FacetWP 是制动砌体布局

我正在使用 FacetWP 构建过滤器表单。不幸的是,masonry当我选择表单中的任何选项时,我的布局正在刹车。结果显示为单列,而不是 3。奇怪的是 F5 使顺序(3 列)正确。
我试图使用这些方法:https ://facetwp.com/documentation/template-configuration/和这个:https ://facetwp.com/using-facetwp-with-existing-template-files/

我的代码是

任何建议都会非常好。

0 投票
1 回答
2294 浏览

javascript - FacetWP 过滤器 - 单击单选按钮重置构面

有人使用 FacetWP 吗?如果用户从方面“ex_type”中选择其中一个单选选项,我正在尝试重置某些过滤器。

如果选择了任何一个单选选项,我希望它能够自动重置其他方面。

Facetwp 有一个函数“onclick="FWP.reset()”但是从后端我无法访问单选按钮。我需要使用单独的 jquery 函数来定位单选按钮选项,如下所示,但是我的代码不起作用。

这是我后端的视图:

显示的“ex_type”单选按钮的实际代码是这样的:

我尝试使用单击功能刷新其他方面的选择,但它不起作用。我试过的代码是:

还有这个:

欢迎任何建议。谢谢你。

0 投票
1 回答
1305 浏览

wordpress - FacetWP - how to put custom order by

I create custom fields using Pods Admin and FacetWP do show and filter on page.

but I need to change "order by" to custom field called "volta-rapida-tempo".

Like this:

How can I do this correctly?

Thanks

0 投票
2 回答
121 浏览

javascript - 下拉选项值 - 不小于

我在一个房地产网站上工作,并要求使用简单的 html 代码为最小卧室、浴室等提供下拉字段:

我知道这些字段需要条件 - 即它不能小于 1 或 2 等。但对编码不太确定。

我正在使用一个名为 FacetWP 的插件来协助搜索字段。

有什么帮助吗?

0 投票
1 回答
98 浏览

wordpress - 过去 30 天内下载最多的文件的 WP date_query

我正在使用 WP 下载管理器来跟踪一些产品,并使用 FacetWP 进行搜索过滤。我正在修改和创建一些带有 FacetWP 的自定义排序选项,没有问题。我不知道如何使用 WP 的“date_query”来修改

这个可以按大多数下载的文件排序(我不包括整个过滤器):

然而,这个根本不起作用:

我觉得之前和之后的比较不正确,任何建议都值得赞赏。

0 投票
1 回答
1400 浏览

wordpress - FacetWP 显示所有选项和方面

我有一个关于 FacetWP 的问题。我的方面通过复选框和下拉菜单链接到自定义字段。

即使没有数据作为幽灵,是否可以显示所有选项和方面?

例如:

我是汽车品牌的一个方面。选项是奥迪,宝马,大众。当没有带有大众的帖子时,我想将大众选项显示为幽灵。另外应该显示空复选框。

我想显示所有选项,空的而不是空的。

我希望你能理解。

问候一月

0 投票
0 回答
547 浏览

php - 更改日期格式 FacetWP

如果我在 Wordpress 的 FacetWP 插件中过滤日期范围。我输出像 2018-11-29 这样的 URL,但我希望它输出不带“-”的日期。所以它将是 20181129。有人知道如何实现这一目标吗?

0 投票
0 回答
314 浏览

javascript - 两次使用同一个 FacetWP 的 facet

我们正在使用 WordPress FacetWP 插件来动态过滤我们网站上的内容。然而,我们有一个我们无法实现的特定要求。我们需要在同一页面上两次嵌入一个方面,并在其中“同步”选定的值。

原因是我们有两种类型的视觉。示例在这里: https ://oseva.webees.dev/osivo/kukurice-oseva-hybrids/

顶部的三个图像和下面的“类别”部分应该是相同的方面,并且一旦您选择其中任何一个项目,它们应该同步值。现在只有第二个方面是这样工作的,而不是第一个方面的图像。

你知道如何解决这个问题吗?我尝试使用两个方面并同步它们的值和许多其他事情,并且其中任何一个都有效。

谢谢, 雅库布

0 投票
1 回答
922 浏览

javascript - FacetWp 预订不适用于 woocommerce 预订?

我正在开发一个预订网站。

我在插件上使用 FacetWp 预订广告按日期过滤我的列表,我也在使用 woocommerce 预订(Accomadation 插件)。

一个月前我安装这个插件之前它工作正常,但从过去几天开始它不起作用,当我按下搜索按钮时没有任何反应。我可以在与此插件相关的浏览器控制台中看到以下错误,我试图联系 FacetWp 支持团队,但没有得到他们的任何回复。我不知道插件发生了什么。没有这个过滤器,我的网站毫无用处。当他们甚至无法为您提供支持时,购买付费插件有什么用。这是错误。

谢谢!

那么这个front.min.js文件的代码

好吧,对不起,它在 JS 文件中的格式是这样的。我对将其格式化为更易读的形式的代码了解不多。

!function() {"use strict";var e;(e=window).FWP=e.FWP||{},e.FWP.hooks=e.FWP.hooks||new function(){function e( e,t,a,c){var o,s,i;if(n[e][t])if(a)if(o=n[e][t],c)for(i=o. length;i--;)(s=o[i]).callback===a&&s.context===c&&o.splice(i,1);else for(i=o.length;i--;)o [i].callback===a&&o.splice(i,1);else n[e][t]=[]}function t(e,t,a,c,o){var s={callback:a ,priority:c,context:o},i=n[e][t];i?(i.push(s),i=function(e){for(var t,a,c,o=1, n=e.length;ot.priority;)e[a]=e[a-1],--a;e[a]=t}return e}(i)):i=[s],n[ e][t]=i}函数a(e,t,a){var c,o,s=n[e][t];if(!s)return"filters"===e&&a[0]; if(o=s.length,"filters"===e)for(c=0;c":">",'"':""","'":"'"};return e.replace (/[&<>"']/g,function(e){return t[e]}).trim()},FWP.helper.detect_loop=function(e){for(var t=null,a=document.createNodeIterator(e,NodeFilter.SHOW_COMMENT,FWP.helper.node_filter,!1);t=a.nextNode();)if(8== =t.nodeType&&"fwp-loop"===t.nodeValue)return t.parentNode;return!1},FWP.helper.node_filter=function(){return NodeFilter.FILTER_ACCEPT},FWP.autoload=function(){ FWP.auto_refresh&&!FWP.is_refresh&&FWP.refresh()},FWP.refresh=function(){FWP.is_refresh=!0,FWP.is_reset||FWP.parse_facets(),FWP.loaded||FWP.load_from_hash(), e(document).trigger("facetwp-refresh"),FWP.loaded&&!FWP.is_popstate&&FWP.set_hash(),FWP.loaded||FWP.is_bfcache||!t(FWP_JSON.preload_data)?FWP.fetch_data(): FWP.render(FWP_JSON.preload_data),e.each(FWP.frozen_facets,function(e,t){"hard"!==t&&delete FWP.frozen_facets[e]}),FWP.paged=1,FWP.soft_refresh= !1,FWP.is_refresh=!1,FWP.is_reset=!1},FWP.parse_facets=function(){FWP.facets={},e(".facetwp-facet").each(function(){var a=e(this),c=a .attr("data-name"),o=a.attr("data-type");FWP.facet_type[c]=o,FWP.hooks.doAction("facetwp/refresh/"+o,a,c );var n=!0;FWP.loaded&&(FWP.soft_refresh||t(FWP.frozen_facets[c]))&&(n=!1),n&&FWP.loading_handler({element:a,facet_name:c,facet_type: o})}),1'),a.find(".facetwp-overlay").css({width:a.width(),height:a.height()})}),e(document)。 on("facetwp-loaded",function(){a.find(".facetwp-overlay").remove()})}}else""==FWP_JSON.loading_animation&&t.element.html('')},FWP .build_query_string=function(){var t="",a=[],c=window.location.search.replace("?","").split("&");e.each(c,function (e,t){0!==t.split("=")[0].indexOf(FWP_JSON.prefix)&&a.push(t)}),a=a.join("&");var o=FWP.helper.serialize(FWP .facets,FWP_JSON.prefix);return""!==a&&(t+=a),""!==o&&(t+=(""!==a?"&":"")+o),t },FWP.set_hash=function(){var e=FWP.build_query_string();""!==e&&(e="?"+e),history.pushState&&history.pushState(null,null,window.location.pathname +e),FWP_HTTP.get={},window.location.search.replace("?","").split("&").forEach(function(e){var t=e.split("= ");FWP_HTTP.get[t[0]]=t[1]})},FWP.load_from_hash=function(){var a=[],c=window.location.search.replace("?"," ").split("&");e.each(c,function(e,t){0===t.split("=")[0].indexOf(FWP_JSON.prefix)&&a.push(t.replace(FWP_JSON.prefix,""))}),a=a.join("&"),e.each(FWP.facets,function(e){FWP.facets[e]=[] }),FWP.paged=1,FWP.extras.sort="default",""!==a&&(a=a.split("&"),e.each(a,function(e,a){ var c=a.split("=")[0],o=a.split("=")[1];if("paged"===c)FWP.paged=o;else if("per_page "===c||"sort"===c)FWP.extras[c]=o;else if(""!==o){var n=t(FWP.facet_type[c])?FWP. facet_type[c]:"";FWP.facets[c]="search"===n||"autocomplete"===n?decodeURIComponent(o):decodeURIComponent(o).split(",")}} ))},FWP.build_post_data=function(){return{facets:JSON.stringify(FWP.facets),frozen_facets:FWP.frozen_facets,http_params:FWP_HTTP,template:FWP.template,extras:FWP.extras,soft_refresh:FWP .soft_refresh?1:0,is_bfcache:FWP。is_bfcache?1:0,first_load:FWP.loaded?0:1,paged:FWP.paged}},FWP.fetch_data=function(){FWP.jqXHR&&4!==FWP.jqXHR.readyState&&FWP.jqXHR.abort(); var t="wp"===FWP.template?document.URL:FWP_JSON.ajaxurl,a={type:"POST",dataType:"text",data:{action:"facetwp_refresh",data:FWP.build_post_data ()},success:function(t){try{var a=e.parseJSON(t);FWP.render(a)}catch(n){var c=t.indexOf('{"facets');if (-1c.length){var o=document.createElement("div");o.innerHTML=a.template;var n=FWP.helper.detect_loop(o);n&&(c=e(n).addClass( "facetwp-template"))}if(01){var n=o.indexOf(c);-10)){var a=FWP.helper.detect_loop(document.body);if(!a)return;e (a).addClass("facetwp-template")}var c=e(".facetwp-template:first");FWP.template=c.is("[data-name]")?c.attr("数据名称"):"wp",0'+FWP.helper.escape_html(t.label)+""}),a+=''+FWP.settings.labels[c]+":"+i+"" }),""!==a&&(a="

    “+一个+”
"),e(".facetwp-selections").html(a)}),e(document).on("click",".facetwp-selections .facetwp-selection-value",function(){if( !FWP.is_refresh){var t=e(this).closest("li").attr("data-facet"),a=e(this).attr("data-value");""!= a?FWP.reset(t,a):FWP.reset(t)}}),e(document).on("click",".facetwp-page",function(){e(".facetwp-page ").removeClass("active"),e(this).addClass("active"),FWP.paged=e(this).attr("data-page"),FWP.soft_refresh=!0,FWP.refresh ()}),e(document).on("change",".facetwp-per-page-select",function(){FWP.extras.per_page=e(this).val(),FWP.soft_refresh= !0,FWP.autoload()}),e(document).on("change",".facetwp-sort-select",function(){FWP.extras.sort=e(this).val(), FWP.soft_refresh=!0,FWP.autoload()}),FWP.refresh()},e(function(){FWP.init()})}(jQuery),function(e){FWP.logic=FWP.logic||{}, e.fn.pVal=function(){var t=e(this).eq(0).val();return t===e(this).attr("placeholder")?"":t}; var t=!1;FWP.hooks.addAction("facetwp/refresh/autocomplete",function(e,t){var a=e.find(".facetwp-autocomplete").val()||""; FWP.facets[t]=a}),e(document).on("facetwp-loaded",function(){e(".facetwp-autocomplete:not(.ready)").each(function(){ var a=e(this),c=a.closest(".facetwp-facet").attr("data-name"),o=FWP.hooks.applyFilters("facetwp/set_options/autocomplete",{serviceUrl: "wp"===FWP.template?document.URL:FWP_JSON.ajaxurl,type:"POST",minChars:3,deferRequestBy:200,showNoSuggestionNotice:!0,triggerSelectOnValidInput:!1,noSuggestionNotice:FWP_JSON.no_results,onSelect:function(){t=!0,FWP.autoload()},params:{action:"facetwp_autocomplete_load",facet_name:c,data:FWP.build_post_data()}},{facet_name:c} );a.autocomplete(o),a.addClass("ready")})}),e(document).on("keyup",".facetwp-autocomplete",function(e){13!==e .which||t||FWP.autoload(),t&&(t=!1)}),e(document).on("click",".facetwp-autocomplete-update",function(){FWP.autoload ()}),FWP.hooks.addAction("facetwp/refresh/checkboxes",function(t,a){var c=[];t.find(".facetwp-checkbox.checked").each(function( ){c.push(e(this).attr("data-value"))}),FWP.facets[a]=c}),FWP.hooks.addFilter("facetwp/selections/checkboxes",function( t,a){var c=[];return e.each(a.selected_values,function(e,t){var o=a.el.find('.facetwp-checkbox[data-value="'+t+'"]').clone();o.find(".facetwp-counter").remove(),o.find(".facetwp-expand").remove(),c.push({value :t,label:o.text()})}),c}),e(document).on("click",".facetwp-type-checkboxes .facetwp-expand",function(t){var a =e(this).parent(".facetwp-checkbox").next(".facetwp-depth");a.toggleClass("visible");var c=a.hasClass("visible")?FWP_JSON.collapse :FWP_JSON.expand;e(this).html(c),t.stopPropagation()}),e(document).on("click",".facetwp-type-checkboxes .facetwp-checkbox:not(.disabled )",function(){e(this).toggleClass("checked"),FWP.autoload()}),e(document).on("click",".facetwp-type-checkboxes .facetwp-toggle" ,function(){var t=e(this).closest(".facetwp-facet");t.find(".facetwp-toggle")。toggleClass("facetwp-hidden"),t.find(".facetwp-overflow").toggleClass("facetwp-hidden")}),e(document).on("facetwp-loaded",function(){e (".facetwp-type-checkboxes .facetwp-overflow").each(function(){var t=e(this).find(".facetwp-checkbox").length,a=e(this).siblings( ".facetwp-toggle:first");a.text(a.text().replace("{num}",t))}),e(".facetwp-type-checkboxes").each(function( ){var t=e(this),a=t.attr("data-name");Object.keys(FWP.settings).length<1||("yes"===FWP.settings[a] .show_expanded&&t.find(".facetwp-depth").addClass("visible"),1>t.find(".facetwp-expand").length&&(t.find(".facetwp-depth").each( function(){var t=e(this).hasClass("visible")?"collapse":"expand";e(this).prev(".facetwp-checkbox").append(' '+FWP_JSON[t]+"")}),t.find(".facetwp-checkbox.checked").each( function(){e(this).parents(".facetwp-depth").each(function(){e(this).prev(".facetwp-checkbox").find(".facetwp-expand")。 html(FWP_JSON.collapse),e(this).addClass("visible")}),e(this).find(".facetwp-expand").trigger("click")})))})}) ,FWP.hooks.addAction("facetwp/refresh/radio",function(t,a){var c=[];t.find(".facetwp-radio.checked").each(function(){c. push(e(this).attr("data-value"))}),FWP.facets[a]=c}),FWP.hooks.addFilter("facetwp/selections/radio",function(t,a) {var c=[];return e.each(a.selected_values,function(e,t){var o=a.el.find('.facetwp-radio[data-value="'+t+'"]' )。克隆();o.find(".facetwp-counter").remove(),c.push({value:t,label:o.text()})}),c}),e(document).on("点击",".facetwp-type-radio .facetwp-radio:not(.disabled)",function(){var t=e(this).hasClass("checked");e(this).closest(".facetwp -facet").find(".facetwp-radio").removeClass("checked"),t||e(this).addClass("checked"),FWP.autoload()}),FWP.hooks.addAction ("facetwp/refresh/date_range",function(e,t){var a=e.find(".facetwp-date-min").pVal()||"",c=e.find(".facetwp -date-max").pVal()||"";FWP.facets[t]=""!==a||""!==c?[a,c]:[]}),FWP. hooks.addFilter("facetwp/selections/date_range",function(e,t){var a=t.selected_values,c=t.el,o="";return""!==a[0]&&(o+ =" "+FWP_JSON.datepicker。fromText+" "+c.find(".facetwp-date-min").next().val()),""!==a[1]&&(o+=" "+FWP_JSON.datepicker.toText+" " +c.find(".facetwp-date-max").next().val()),o}),e(document).on("facetwp-loaded",function(){var t=e( '.facetwp-type-date_range .facetwp-date:not(".ready, .flatpickr-alt")');if(0!==t.length){var a={altInput:!0,altInputClass:" flatpickr-alt",altFormat:"Ymd",disableMobile:!0,locale:FWP_JSON.datepicker.locale,onChange:function(){FWP.autoload()},onReady:function(t,a,c){var o =''+FWP_JSON.datepicker.clearText+"";e(o).on("click",function(){c.clear(),c.close()}).appendTo(e(c.calendarContainer)) }};t.each(function(){var t=e(this),c=t.closest(".facetwp-facet").attr("data-name");a.altFormat=FWP.settings[c].format;var o=FWP.hooks.applyFilters("facetwp/set_options/date_range",a,{facet_name:c,element:t});new flatpickr(this,o),t.addClass("准备好")})}}),FWP.hooks.addAction("facetwp/refresh/dropdown",function(e,t){var a=e.find(".facetwp-dropdown").val();FWP .facets[t]=a?[a]:[]}),FWP.hooks.addFilter("facetwp/selections/dropdown",function(e,t){return t.el.find(".facetwp-dropdown option:selected").text()}),e(document).on("change",".facetwp-type-dropdown select",function(){var t=e(this).closest(".facetwp -facet"),a=t.attr("data-name");""!==t.find(":selected").val()&&(FWP.frozen_facets[a]="soft"), FWP.autoload()}),FWP.hooks.addAction("facetwp/refresh/fselect",function(t,a){var c=t.find("select").val();null===c||""===c?c=[]:!1===e.isArray(c)&&(c=[c]),FWP.facets[a]= c}),FWP.hooks.addFilter("facetwp/selections/fselect",function(t,a){var c=[];return e.each(a.selected_values,function(e,t){var o= a.el.find('.facetwp-dropdown option[value="'+t+'"]').text();c.push({value:t,label:o.replace(/{{(.* ?)}}/,"")})}),c}),e(document).on("facetwp-loaded",function(){e(".facetwp-type-fselect select:not(.ready )").each(function(){var t=e(this).closest(".facetwp-facet").attr("data-name"),a=FWP.settings[t];a.optionFormatter= function(e){return e=(e=e.replace(/{{/g,'')).replace(/}}/g,"")};var c=FWP.hooks.applyFilters("facetwp /set_options/fselect",a,{facet_name:t});e(this).fSelect(c),e(this).addClass("ready")}),e(".fs-wrap.fs-disabled").removeClass("fs-disabled")}),e(document).on("fs:changed",function(t,a){if(e(a).closest(".facetwp- facet").length>0&&a.classList.contains("multiple")){var c=e(a).closest(".facetwp-facet").attr("data-name");"or"== =FWP.settings[c].operator&&(FWP.frozen_facets[c]="soft",FWP.auto_refresh&&e(a).addClass("fs-disabled")),FWP.autoload()}}),e(document ).on("fs:closed",function(t,a){e(a).closest(".facetwp-facet").length>0&&!a.classList.contains("multiple")&&FWP.autoload( )}),FWP.hooks.addAction("facetwp/refresh/hierarchy",function(t,a){var c=[];t.find(".facetwp-link.checked").each(function() {c.push(e(this).attr("data-value"))}),FWP.facets[a]=c}),FWP。hooks.addFilter("facetwp/selections/hierarchy",function(e,t){return t.el.find(".facetwp-link.checked").text()}),e(document).on(" click",".facetwp-type-hierarchy .facetwp-link",function(){e(this).closest(".facetwp-facet").find(".facetwp-link").removeClass("checked" ),""!==e(this).attr("data-value")&&e(this).addClass("checked"),FWP.autoload()}),e(document).on("click" ,".facetwp-type-hierarchy .facetwp-toggle",function(){var t=e(this).closest(".facetwp-facet");t.find(".facetwp-toggle").toggleClass( "facetwp-hidden"),t.find(".facetwp-overflow").toggleClass("facetwp-hidden")}),FWP.hooks.addAction("facetwp/refresh/number_range",function(e,t) {var a=e.find(".facetwp-number-min").val()||"",c=e.find(".facetwp-number-max").val()||"";FWP.facets[t]=""! ==a||""!==c?[a,c]:[]}),FWP.hooks.addFilter("facetwp/selections/number_range",function(e,t){return t.selected_values[0 ]+" - "+t.selected_values[1]}),e(document).on("click",".facetwp-type-number_range .facetwp-submit",function(){FWP.refresh()}) ,e(document).on("facetwp-loaded",function(){var t=e(".facetwp-location");t.length<1||(FWP.loaded||(window.FWP_MAP=window .FWP_MAP||{},FWP_MAP.sessionToken=新 google.maps.places.AutocompleteSessionToken,FWP_MAP.autocompleteService=新 google.maps.places.AutocompleteService,FWP_MAP.placesService=新 google.maps.places.PlacesService(document.createElement( "div")),e(document).on("input",".facetwp-location",FWP.helper.debounce(function(){var t=e(this).val(),a=e(this).closest(".facetwp-facet");if("" ==t||t.length',c+=''+e.structured_formatting.main_text+" ",c+=''+e.structured_formatting.secondary_text+"",c+=''+e.description+"",c+=" "}),a.find(".location-results").html(c).removeClass("facetwp-hidden")}})}},FWP_JSON.proximity.queryDelay))),t.each(function( t,a){var c=e(this);c.closest(".location-wrap").length<1&&(0===t&&(c.attr("id","facetwp-location"), c.closest(".facetwp-facet").find(".facetwp-radius").attr("id","facetwp-radius")),c.wrap(''),c.before('' ),c.after('')),c.trigger("keyup")}))}),e(document).on("click",".location-result",function(){var t=e(this).closest(".facetwp-facet"),a=e(this).attr(" data-id"),c=e(this).find(".result-description").text();FWP_MAP.placesService.getDetails({placeId:a,fields:["geometry"]},function(e ,a){a===google.maps.places.PlacesServiceStatus.OK&&(t.find(".facetwp-lat").val(e.geometry.location.lat()),t.find(".facetwp -lng").val(e.geometry.location.lng()),FWP.autoload())}),e(".facetwp-location").val(c),e(".location-results" ).addClass("facetwp-hidden")}),e(document).on("click",".facetwp-type-proximity .locate-me",function(t){var a=e(this), c=a.closest(".facetwp-facet"),o=c.find(".facetwp-location"),n=c.find(".facetwp-lat"),s=c.find(".facetwp-lng");if(a.hasClass("f-reset"))return n.val(""),n.val(""),o.val(""),void FWP.autoload() ;a.addClass("f-loading"),navigator.geolocation.getCurrentPosition(function(e){var t=e.coords.latitude,c=e.coords.longitude;n.val(t),s.val (c);var i=new google.maps.Geocoder,r={lat:parseFloat(t),lng:parseFloat(c)};i.geocode({location:r},function(e,t){t ===google.maps.GeocoderStatus.OK?o.val(e[0].formatted_address):o.val("你的位置"),a.addClass("f-reset"),FWP.autoload()} ),a.removeClass("f-loading")},function(){a.removeClass("f-loading")})}),e(document).on("keyup",".facetwp-location" ,function(t){var a=e(this).closest(".facetwp-facet");if(a.find(".locate-me").toggleClass("f-reset",""!= =e(this).val()),38===t.which||40===t.which||13===t.which)var c=parseInt(a.find(".location-result.active").attr("data- index")),o=parseInt(a.find(".location-result:last").attr("data-index"));if(38===t.which){var n=0=parseFloat (c.range.max))return FWP.settings[a].lower=c.range.min,FWP.settings[a].upper=c.range.max,void FWP.hooks.doAction("facetwp/set_label /slider",t);var o=FWP.hooks.applyFilters("facetwp/set_options/slider",{range:c.range,start:c.start,step:parseFloat(c.step),connect:!0 },{facet_name:a}),n=e(this)[0];noUiSlider.create(n,o),n.noUiSlider.on("update",function(e,c){FWP.settings[a ].lower=e[0],FWP.settings[a].upper=e[1],FWP.hooks.doAction("facetwp/set_label/slider",t)}),n.noUiSlider.on("set ",function(){FWP.frozen_facets[a]="hard",FWP.autoload()}),e(this)。addClass("ready")}}),e(".facetwp-type-slider").each(function(){var t=e(this).attr("data-name"),a=e(this ).find(".facetwp-slider-reset");e.isEmptyObject(FWP.facets[t])?a.hide():a.show()})}),e(document).on(" click",".facetwp-type-slider .facetwp-slider-reset",function(){var t=e(this).closest(".facetwp-facet").attr("data-name");FWP .reset(t)}),FWP.hooks.addAction("facetwp/refresh/rating",function(t,a){var c=[];t.find(".facetwp-star.selected").each (function(){var t=e(this).attr("data-value");""!=t&&c.push(t)}),FWP.facets[a]=c}),e(document) .on("mouseover",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet");if(e(this).hasClass("selected")) t.find(".facetwp-star-label").text(FWP_JSON.rating.Undo);else{var a="5"==e(this).attr("data-value")?"":FWP_JSON.rating["& up"];t. find(".facetwp-star-label").text(a),t.find(".facetwp-counter").text("("+e(this).data("counter")+")" )}}),e(document).on("mouseout",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet");t.find(" .facetwp-star-label").text(""),t.find(".facetwp-counter").text("")}),e(document).on("click",".facetwp-星”,function(){var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(".facetwp-star") .removeClass("selected"),a||e(this).addClass("selected"),FWP.autoload()})}(jQuery)}();rating.Undo);else{var a="5"==e(this).attr("data-value")?"":FWP_JSON.rating["& up"];t.find(".facetwp-星标").text(a),t.find(".facetwp-counter").text("("+e(this).data("counter")+")")}}),e (document).on("mouseout",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet");t.find(".facetwp-star-label ").text(""),t.find(".facetwp-counter").text("")}),e(document).on("click",".facetwp-star",function() {var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(".facetwp-star").removeClass("selected" ),a||e(this).addClass("selected"),FWP.autoload()})}(jQuery)}();rating.Undo);else{var a="5"==e(this).attr("data-value")?"":FWP_JSON.rating["& up"];t.find(".facetwp-星标").text(a),t.find(".facetwp-counter").text("("+e(this).data("counter")+")")}}),e (document).on("mouseout",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet");t.find(".facetwp-star-label ").text(""),t.find(".facetwp-counter").text("")}),e(document).on("click",".facetwp-star",function() {var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(".facetwp-star").removeClass("selected" ),a||e(this).addClass("selected"),FWP.autoload()})}(jQuery)}();==e(this).attr("data-value")?"":FWP_JSON.rating["& up"];t.find(".facetwp-star-label").text(a),t. find(".facetwp-counter").text("("+e(this).data("counter")+")")}}),e(document).on("mouseout",".facetwp -star",function(){var t=e(this).closest(".facetwp-facet");t.find(".facetwp-star-label").text(""),t.find( ".facetwp-counter").text("")}),e(document).on("click",".facetwp-star",function(){var t=e(this).closest(". facetwp-facet"),a=e(this).hasClass("selected");t.find(".facetwp-star").removeClass("selected"),a||e(this).addClass("选中"),FWP.autoload()})}(jQuery)}();==e(this).attr("data-value")?"":FWP_JSON.rating["& up"];t.find(".facetwp-star-label").text(a),t. find(".facetwp-counter").text("("+e(this).data("counter")+")")}}),e(document).on("mouseout",".facetwp -star",function(){var t=e(this).closest(".facetwp-facet");t.find(".facetwp-star-label").text(""),t.find( ".facetwp-counter").text("")}),e(document).on("click",".facetwp-star",function(){var t=e(this).closest(". facetwp-facet"),a=e(this).hasClass("selected");t.find(".facetwp-star").removeClass("selected"),a||e(this).addClass("选中"),FWP.autoload()})}(jQuery)}();up"];t.find(".facetwp-star-label").text(a),t.find(".facetwp-counter").text("("+e(this).data("counter ")+")")}}),e(document).on("mouseout",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet") ;t.find(".facetwp-star-label").text(""),t.find(".facetwp-counter").text("")}),e(document).on("点击",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(" .facetwp-star").removeClass("selected"),a||e(this).addClass("selected"),FWP.autoload()})}(jQuery)}();up"];t.find(".facetwp-star-label").text(a),t.find(".facetwp-counter").text("("+e(this).data("counter ")+")")}}),e(document).on("mouseout",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet") ;t.find(".facetwp-star-label").text(""),t.find(".facetwp-counter").text("")}),e(document).on("点击",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(" .facetwp-star").removeClass("selected"),a||e(this).addClass("selected"),FWP.autoload()})}(jQuery)}();)+")")}}),e(document).on("mouseout",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet"); t.find(".facetwp-star-label").text(""),t.find(".facetwp-counter").text("")}),e(document).on("click" ,".facetwp-star",function(){var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(". facetwp-star").removeClass("selected"),a||e(this).addClass("selected"),FWP.autoload()})}(jQuery)}();)+")")}}),e(document).on("mouseout",".facetwp-star",function(){var t=e(this).closest(".facetwp-facet"); t.find(".facetwp-star-label").text(""),t.find(".facetwp-counter").text("")}),e(document).on("click" ,".facetwp-star",function(){var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(". facetwp-star").removeClass("selected"),a||e(this).addClass("selected"),FWP.autoload()})}(jQuery)}();facetwp-star",function(){var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(".facetwp-star ").removeClass("selected"),a||e(this).addClass("selected"),FWP.autoload()})}(jQuery)}();facetwp-star",function(){var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(".facetwp-star ").removeClass("selected"),a||e(this).addClass("selected"),FWP.autoload()})}(jQuery)}();

再次感谢!