initial
This commit is contained in:
commit
9883323161
17470 files changed
+4470592
No files matched your search
Vendored
+1
@@ -0,0 +1 @@
|
||||
(()=>{var e;(e=jQuery)(".acf-escaped-html-notice").on("click",".acf-show-more-details",function(t){t.preventDefault();const c=e(t.target),a=c.closest(".acf-escaped-html-notice").find(".acf-error-details");a.is(":hidden")?(a.slideDown(100),c.text(acf_escaped_html_notice.hide_details)):(a.slideUp(100),c.text(acf_escaped_html_notice.show_details))})})();
|
||||
+1
@@ -0,0 +1 @@
|
||||
(()=>{var e={3717(){!function(e,t,i){const n={data:{openedBy:null,currentFieldType:null,popularFieldTypes:["text","textarea","email","url","file","gallery","select","true_false","link","post_object","relationship","repeater","flexible_content","clone"]},events:{"click .acf-modal-close":"onClickClose","keydown .acf-browse-fields-modal":"onPressEscapeClose","click .acf-select-field":"onClickSelectField","click .acf-field-type":"onClickFieldType","changed:currentFieldType":"onChangeFieldType","input .acf-search-field-types":"onSearchFieldTypes","click .acf-browse-popular-fields":"onClickBrowsePopular"},setup:function(t){e.extend(this.data,t),this.$el=e(this.tmpl()),this.render()},initialize:function(){this.open(),this.lockFocusToModal(!0),this.$el.find(".acf-modal-title").trigger("focus"),i.doAction("show",this.$el)},tmpl:function(){return e("#tmpl-acf-browse-fields-modal").html()},getFieldTypes:function(e,t){let n;if(n=i.get("is_pro")?Object.values(i.get("fieldTypes")):Object.values({...i.get("fieldTypes"),...i.get("PROFieldTypes")}),e){if("popular"===e)return n.filter(e=>this.get("popularFieldTypes").includes(e.name));if("pro"===e)return n.filter(e=>e.pro);n=n.filter(t=>t.category===e)}return t&&(n=n.filter(e=>{const i=e.label.toLowerCase(),n=i.split(" ");let a=!1;return i.startsWith(t.toLowerCase())?a=!0:n.length>1&&n.forEach(e=>{e.startsWith(t.toLowerCase())&&(a=!0)}),a})),n},render:function(){i.doAction("append",this.$el);const t=this.$el.find(".acf-field-types-tab"),n=this;t.each(function(){const t=e(this).data("category");n.getFieldTypes(t).forEach(t=>{e(this).append(n.getFieldTypeHTML(t))})}),this.initializeFieldLabel(),this.initializeFieldType(),this.onChangeFieldType()},getFieldTypeHTML:function(e){const t=e.name.replaceAll("_","-");return`\n\t\t\t<a href="#" class="acf-field-type" data-field-type="${e.name}">\n\t\t\t\t${e.pro&&!i.get("is_pro")?'<span class="field-type-requires-pro not-pro"></span>':e.pro?'<span class="field-type-requires-pro"></span>':""}\n\t\t\t\t<i class="field-type-icon field-type-icon-${t}"></i>\n\t\t\t\t<span class="field-type-label">${e.label}</span>\n\t\t\t</a>\n\t\t\t`},decodeFieldTypeURL:function(e){return"string"!=typeof e?e:e.replaceAll("&","&")},renderFieldTypeDesc:function(e){const t=this.getFieldTypes().filter(t=>t.name===e)[0]||{},n=i.parseArgs(t,{label:"",description:"",doc_url:!1,tutorial_url:!1,preview_image:!1,pro:!1});this.$el.find(".field-type-name").text(n.label),this.$el.find(".field-type-desc").text(n.description),n.doc_url?this.$el.find(".field-type-doc").attr("href",this.decodeFieldTypeURL(n.doc_url)).show():this.$el.find(".field-type-doc").hide(),n.tutorial_url?this.$el.find(".field-type-tutorial").attr("href",this.decodeFieldTypeURL(n.tutorial_url)).parent().show():this.$el.find(".field-type-tutorial").parent().hide(),n.preview_image?this.$el.find(".field-type-image").attr("src",n.preview_image).show():this.$el.find(".field-type-image").hide();const a=i.get("is_pro"),l=i.get("isLicenseActive"),s=this.$el.find(".acf-btn-pro"),o=this.$el.find(".field-type-upgrade-to-unlock");!n.pro||a&&l?(s.hide(),o.hide(),this.$el.find(".acf-insert-field-label").attr("disabled",!1),this.$el.find(".acf-select-field").show()):(s.show(),s.attr("href",s.data("urlBase")+e),o.show(),o.attr("href",o.data("urlBase")+e),this.$el.find(".acf-insert-field-label").attr("disabled",!0),this.$el.find(".acf-select-field").hide())},initializeFieldType:function(){const t=this.get("openedBy"),i=t?.data?.type;i?this.set("currentFieldType",i):this.set("currentFieldType","text");const n=this.getFieldTypes();let a="";a=this.get("popularFieldTypes").includes(i)?"popular":n.find(e=>e.name===i).category;const l=`.acf-modal-content .acf-tab-wrap a:contains('${a[0].toUpperCase()+a.slice(1)}')`;setTimeout(()=>{e(l).click()},0)},initializeFieldLabel:function(){const e=this.get("openedBy").$fieldLabel().val(),t=this.$el.find(".acf-insert-field-label");e?t.val(e):t.val("")},updateFieldObjectFieldLabel:function(){const e=this.$el.find(".acf-insert-field-label").val(),t=this.get("openedBy");t.$fieldLabel().val(e),t.$fieldLabel().trigger("blur")},onChangeFieldType:function(){const e=this.get("currentFieldType");this.$el.find(".selected").removeClass("selected"),this.$el.find('.acf-field-type[data-field-type="'+e+'"]').addClass("selected"),this.renderFieldTypeDesc(e)},onSearchFieldTypes:function(t){const i=this.$el.find(".acf-browse-fields-modal"),n=this.$el.find(".acf-search-field-types").val(),a=this;let l,s="",o=[];if("string"==typeof n&&(l=n.trim(),o=this.getFieldTypes(!1,l)),l.length&&o.length?i.addClass("is-searching"):i.removeClass("is-searching"),!o.length)return i.addClass("no-results-found"),void this.$el.find(".acf-invalid-search-term").text(l);i.removeClass("no-results-found"),o.forEach(e=>{s+=a.getFieldTypeHTML(e)}),e(".acf-field-type-search-results").html(s),this.set("currentFieldType",o[0].name),this.onChangeFieldType()},onClickBrowsePopular:function(){this.$el.find(".acf-search-field-typLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
(()=>{var t={4750(){!function(t){acf.newCompatibility=function(t,e){return(e=e||{}).__proto__=t.__proto__,t.__proto__=e,t.compatibility=e,e},acf.getCompatibility=function(t){return t.compatibility||null};var e=acf.newCompatibility(acf,{l10n:{},o:{},fields:{},update:acf.set,add_action:acf.addAction,remove_action:acf.removeAction,do_action:acf.doAction,add_filter:acf.addFilter,remove_filter:acf.removeFilter,apply_filters:acf.applyFilters,parse_args:acf.parseArgs,disable_el:acf.disable,disable_form:acf.disable,enable_el:acf.enable,enable_form:acf.enable,update_user_setting:acf.updateUserSetting,prepare_for_ajax:acf.prepareForAjax,is_ajax_success:acf.isAjaxSuccess,remove_el:acf.remove,remove_tr:acf.remove,str_replace:acf.strReplace,render_select:acf.renderSelect,get_uniqid:acf.uniqid,serialize_form:acf.serialize,esc_html:acf.strEscape,str_sanitize:acf.strSanitize});e._e=function(t,e){t=t||"";var i=(e=e||"")?t+"."+e:t,a={"image.select":"Select Image","image.edit":"Edit Image","image.update":"Update Image"};if(a[i])return acf.__(a[i]);var n=this.l10n[t]||"";return e&&(n=n[e]||""),n},e.get_selector=function(e){var i=".acf-field";if(!e)return i;if(t.isPlainObject(e)){if(t.isEmptyObject(e))return i;for(var a in e){e=e[a];break}}return i+="-"+e,i=acf.strReplace("_","-",i),acf.strReplace("field-field-","field-",i)},e.get_fields=function(t,e,i){var a={is:t||"",parent:e||!1,suppressFilters:i||!1};return a.is&&(a.is=this.get_selector(a.is)),acf.findFields(a)},e.get_field=function(t,e){var i=this.get_fields.apply(this,arguments);return!!i.length&&i.first()},e.get_closest_field=function(t,e){return t.closest(this.get_selector(e))},e.get_field_wrap=function(t){return t.closest(this.get_selector())},e.get_field_key=function(t){return t.data("key")},e.get_field_type=function(t){return t.data("type")},e.get_data=function(t,e){return acf.parseArgs(t.data(),e)},e.maybe_get=function(t,e,i){void 0===i&&(i=null),keys=String(e).split(".");for(var a=0;a<keys.length;a++){if(!t.hasOwnProperty(keys[a]))return i;t=t[keys[a]]}return t};var i=function(t){return t instanceof acf.Field?t.$el:t},a=function(e){return function(){if(arguments.length)var a=function(t){return acf.arrayArgs(t).map(i)}(arguments);else a=[t(document)];return e.apply(this,a)}};e.add_action=function(t,i,n,s){var o=t.split(" "),r=o.length;if(r>1){for(var c=0;c<r;c++)t=o[c],e.add_action.apply(this,arguments);return this}return i=a(i),acf.addAction.apply(this,arguments)},e.add_filter=function(t,e,i,n){return e=a(e),acf.addFilter.apply(this,arguments)},e.model={actions:{},filters:{},events:{},extend:function(e){var i=t.extend({},this,e);return t.each(i.actions,function(t,e){i._add_action(t,e)}),t.each(i.filters,function(t,e){i._add_filter(t,e)}),t.each(i.events,function(t,e){i._add_event(t,e)}),i},_add_action:function(t,e){var i=t.split(" "),a=(t=i[0]||"",i[1]||10);acf.add_action(t,this[e],a,this)},_add_filter:function(t,e){var i=t.split(" "),a=(t=i[0]||"",i[1]||10);acf.add_filter(t,this[e],a,this)},_add_event:function(e,i){var a=this,n=e.indexOf(" "),s=n>0?e.substr(0,n):e,o=n>0?e.substr(n+1):"",r=function(e){e.$el=t(this),acf.field_group&&(e.$field=e.$el.closest(".acf-field-object")),"function"==typeof a.event&&(e=a.event(e)),a[i].apply(a,arguments)};o?t(document).on(s,o,r):t(document).on(s,r)},get:function(t,e){return e=e||null,void 0!==this[t]&&(e=this[t]),e},set:function(t,e){return this[t]=e,"function"==typeof this["_set_"+t]&&this["_set_"+t].apply(this),this}},e.field=acf.model.extend({type:"",o:{},$field:null,_add_action:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_action(t,function(t){i.set("$field",t),i[e].apply(i,arguments)})},_add_filter:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_filter(t,function(t){i.set("$field",t),i[e].apply(i,arguments)})},_add_event:function(e,i){var a=this,n=e.substr(0,e.indexOf(" ")),s=e.substr(e.indexOf(" ")+1),o=acf.get_selector(a.type);t(document).on(n,o+" "+s,function(e){var n=t(this),s=acf.get_closest_field(n,a.type);s.length&&(s.is(a.$field)||a.set("$field",s),e.$el=n,e.$field=s,a[i].apply(a,[e]))})},_set_$field:function(){"function"==typeof this.focus&&this.focus()},doFocus:function(t){return this.set("$field",t)}}),acf.newCompatibility(acf.validation,{remove_error:function(t){acf.getField(t).removeError()},add_warning:function(t,e){acf.getField(t).showNotice({text:e,type:"warning",timeout:1e3})},fetch:acf.validateForm,enableSubmit:acf.enableSubmit,disableSubmit:acf.disableSubmit,showSpinner:acf.showSpinner,hideSpinner:acf.hideSpinner,unlockForm:acf.unlockForm,lockForm:acf.lockForm}),e.tooltip={tooltip:function(t,e){return acf.newTooltip({text:t,target:e}).$el},temp:function(t,e){acf.newTooltip({text:t,target:e,timeout:250})},confirm:function(t,e,i,a,n){acf.newTooltip({confirm:!0,text:i,target:t,confirm:function(){e(!0)},cancel:function(){e(!1)}})},confirm_remove:function(t,e){acf.newTooltip({confirmRemove:!0,target:t,confirm:function(){e(!0)},cancel:function(){e(!1)}})}},e.media=new acf.Model({activLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
(()=>{var e={237(){!function(e){const t=function(t){const a=e(`<span class="acf-selection">${acf.strEscape(t.text)}</span>`);return a.data("element",t.element),a};acf.add_filter("select2_args",function(a,n){const l=n.attr("name")||"",s=["schema_type","schema_property","schema_output_format"].find(e=>l.includes(e));if(!s)return a;a.dropdownCssClass=s.replaceAll("_","-")+"-select-results",a.templateResult=t,a.templateSelection=t,"schema_type"===s&&(a.allowReorder=!1),"schema_output_format"===s&&(n.find("option").length<=1?(acf.lock(n,"disabled","schema_single_option"),n.prop("disabled",!0)):(acf.unlock(n,"disabled","schema_single_option"),n.prop("disabled",!1)));try{e.fn.select2.amd.require("select2/compat/dropdownCss")}catch{delete a.dropdownCssClass}return"schema_property"===s&&(a.matcher=function(t,a){if(!t.term||""===t.term.trim())return a;if(a.children&&a.children.length>0)return a.text.toLowerCase().includes(t.term.toLowerCase())?a:e.fn.select2.defaults.defaults.matcher(t,a);const n=t.term.toLowerCase();if(a.text.toLowerCase().includes(n))return a;if(a.element?.parentElement){const e=a.element.parentElement;if("OPTGROUP"===e.tagName&&e.label&&e.label.toLowerCase().includes(n))return a}return null}),a}),acf.addAction("select2_init",function(t){const a=t.attr("name")||"";(a.includes("schema_property")||a.includes("schema_output_format"))&&t.on("select2:open",function(){const t=a.includes("schema_property")?"schema-property-select-results":"schema-output-format-select-results";e("."+t+" input.select2-search__field").attr("placeholder",acf.__("Type to search..."))})}),new acf.Model({id:"internalPostTypeSettingsManager",wait:"ready",events:{"blur .acf_slugify_to_key":"onChangeSlugify","blur .acf_singular_label":"onChangeSingularLabel","blur .acf_plural_label":"onChangePluralLabel","change .acf_hierarchical_switch":"onChangeHierarchical","click .acf-regenerate-labels":"onClickRegenerateLabels","click .acf-clear-labels":"onClickClearLabels","change .rewrite_slug_field":"onChangeURLSlug","keyup .rewrite_slug_field":"onChangeURLSlug",'change .acf_post_type_supports input[value="editor"]':"onChangeEditorSupport"},onChangeSlugify:function(t,a){const n=a.val(),l=e(".acf_slugified_key");if(""==l.val().trim()){let e=acf.strSanitize(n.trim()).replaceAll("_","-");e=acf.applyFilters("generate_internal_post_type_name",e,this);let t=0;"taxonomy"===acf.get("screen")?t=32:"post_type"===acf.get("screen")&&(t=20),t&&(e=e.substring(0,t)),l.val(e)}},initialize:function(){if(!["taxonomy","post_type"].includes(acf.get("screen")))return;const t=function(t){if(void 0===t.element)return t;const a=e(t.element.parentElement),n=e('<span class="acf-selection"></span>');n.html(acf.strEscape(t.element.innerHTML));let l=!1;return a.filter(".acf-taxonomy-manage_terms, .acf-taxonomy-edit_terms, .acf-taxonomy-delete_terms").length&&"manage_categories"===t.id||a.filter(".acf-taxonomy-assign_terms").length&&"edit_posts"===t.id?l=!0:"taxonomy_key"!==t.id&&"post_type_key"!==t.id&&"default"!==t.id||(l=!0),l&&n.append('<span class="acf-select2-default-pill">'+acf.__("Default")+"</span>"),n.data("element",t.element),n};acf.newSelect2(e("select.query_var"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.acf-taxonomy-manage_terms"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.acf-taxonomy-edit_terms"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.acf-taxonomy-delete_terms"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.acf-taxonomy-assign_terms"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.meta_box"),{field:!1,templateSelection:t,templateResult:t});const a=acf.newSelect2(e("select.permalink_rewrite"),{field:!1,templateSelection:t,templateResult:t});e(".rewrite_slug_field").trigger("change"),a.on("change",function(t){e(".rewrite_slug_field").trigger("change")})},onChangeURLSlug:function(t,a){const n=e("div.acf-field.acf-field-permalink-rewrite"),l=n.find("select").find("option:selected").val(),s=n.data(l+"_instructions"),c=n.data("site_url"),i=n.find("p.description").first();if("taxonomy_key"===l||"post_type_key"===l)var o=e(".acf_slugified_key").val().trim();else o=a.val().trim();o.length||(o="{slug}"),i.html(e("<span>"+s+"</span>").text().replace("{slug}","<strong>"+e("<span>"+c+"/"+o+"</span>").text()+"</strong>"))},onChangeSingularLabel:function(e,t){const a=t.val();this.updateLabels(a,"singular",!1)},onChangePluralLabel:function(e,t){const a=t.val();this.updateLabels(a,"plural",!1)},onChangeHierarchical:function(t,a){const n=a.is(":checked");if("taxonomy"===acf.get("screen")){let t=e(".acf-field-meta-box").data("tags_meta_box");n&&(t=e(".acf-field-meta-box").data("categories_meta_box")),e("#acf_taxonomy-meta_box").find("option:first").text(t).trigger("change")}this.updatePlaceholders(n)},onChangeEditorSupport:function(t,a){const n=a.is(":checked"),l=e('.acf_post_type_supports input[value="notes"]');n?l.prop(Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
(()=>{var t={9829(){var t;t=jQuery,acf.copyable=new acf.Model({events:{"click .copyable":"copyCopyable"},wait:"ready",initialize:function(){if("undefined"==typeof pagenow)return;if(!["edit-acf-field-group","edit-acf-post-type","edit-acf-taxonomy","edit-acf-ui-options-page"].includes(pagenow))return;const e=t(document).find(".column-acf-key");e&&e.each(function(){t(this).html(acf.copyable.makeCopyable(t(this)))})},makeCopyable:function(t){const e=acf.strSanitize(t.text()),n=t.html();let i="copyable";return navigator.clipboard||(i=`${i} copy-unsupported`),n.replace(e,`<span class="${i}">${e}</span>`)},copyCopyable:function(e){if(e.stopPropagation(),!navigator.clipboard||t(e.target).is("input"))return;let n;n=t(e.target).hasClass("acf-input-wrap")?t(e.target).find("input").first().val():t(e.target).text().trim(),navigator.clipboard.writeText(n).then(()=>{t(e.target).closest(".copyable").addClass("copied"),setTimeout(function(){t(e.target).closest(".copyable").removeClass("copied")},2e3)})}})},1018(){!function(){"use strict";acf.hooks=new function(){var t={removeFilter:function(e,i){return"string"==typeof e&&n("filters",e,i),t},applyFilters:function(){var e=Array.prototype.slice.call(arguments),n=e.shift();return"string"==typeof n?o("filters",n,e):t},addFilter:function(e,n,o,r){return"string"==typeof e&&"function"==typeof n&&i("filters",e,n,o=parseInt(o||10,10),r),t},removeAction:function(e,i){return"string"==typeof e&&n("actions",e,i),t},doAction:function(){var e=Array.prototype.slice.call(arguments),n=e.shift();return"string"==typeof n&&o("actions",n,e),t},addAction:function(e,n,o,r){return"string"==typeof e&&"function"==typeof n&&i("actions",e,n,o=parseInt(o||10,10),r),t},storage:function(){return e}},e={actions:{},filters:{}};function n(t,n,i,o){if(e[t][n])if(i){var r,a=e[t][n];if(o)for(r=a.length;r--;){var c=a[r];c.callback===i&&c.context===o&&a.splice(r,1)}else for(r=a.length;r--;)a[r].callback===i&&a.splice(r,1)}else e[t][n]=[]}function i(t,n,i,o,r){var a={callback:i,priority:o,context:r},c=e[t][n];c?(c.push(a),c=function(t){for(var e,n,i,o=1,r=t.length;o<r;o++){for(e=t[o],n=o;(i=t[n-1])&&i.priority>e.priority;)t[n]=t[n-1],--n;t[n]=e}return t}(c)):c=[a],e[t][n]=c}function o(t,n,i){var o=e[t][n];if(!o)return"filters"===t&&i[0];var r=0,a=o.length;if("filters"===t)for(;r<a;r++)i[0]=o[r].callback.apply(o[r].context,i);else for(;r<a;r++)o[r].callback.apply(o[r].context,i);return"filters"!==t||i[0]}return t}}(window)},5751(){var t;t=jQuery,acf.models.Modal=acf.Model.extend({data:{title:"",content:"",toolbar:""},events:{"click .acf-modal-close":"onClickClose"},setup:function(e){t.extend(this.data,e),this.$el=t(),this.render()},initialize:function(){this.open()},render:function(){var e=this.get("title"),n=this.get("content"),i=this.get("toolbar"),o=t(["<div>",'<div class="acf-modal">','<div class="acf-modal-title">',"<h2>"+e+"</h2>",'<button class="acf-modal-close" type="button"><span class="dashicons dashicons-no"></span></button>',"</div>",'<div class="acf-modal-content">'+n+"</div>",'<div class="acf-modal-toolbar">'+i+"</div>","</div>",'<div class="acf-modal-backdrop acf-modal-close"></div>',"</div>"].join(""));this.$el&&this.$el.replaceWith(o),this.$el=o,acf.doAction("append",o)},update:function(t){this.data=acf.parseArgs(t,this.data),this.render()},title:function(t){this.$(".acf-modal-title h2").html(t)},content:function(t){this.$(".acf-modal-content").html(t)},toolbar:function(t){this.$(".acf-modal-toolbar").html(t)},open:function(){t("body").append(this.$el)},close:function(){this.remove()},onClickClose:function(t,e){t.preventDefault(),this.close()},focus:function(){this.$el.find(".acf-icon").first().trigger("focus")},lockFocusToModal:function(e){let n=t("#wpwrap");n.length&&(n[0].inert=e,n.attr("aria-hidden",e))},returnFocusToOrigin:function(){this.data.openedBy instanceof t&&this.data.openedBy.closest("body").length>0&&this.data.openedBy.trigger("focus")}}),acf.newModal=function(t){return new acf.models.Modal(t)}},6891(){var t,e,n;t=jQuery,e=/^(\S+)\s*(.*)$/,n=acf.Model=function(){this.cid=acf.uniqueId("acf"),this.data=t.extend(!0,{},this.data),this.setup.apply(this,arguments),this.$el&&!this.$el.data("acf")&&this.$el.data("acf",this);var e=function(){this.initialize(),this.addEvents(),this.addActions(),this.addFilters()};this.wait&&!acf.didAction(this.wait)?this.addAction(this.wait,e):e.apply(this)},t.extend(n.prototype,{id:"",cid:"",$el:null,data:{},busy:!1,changed:!1,events:{},actions:{},filters:{},eventScope:"",wait:!1,priority:10,get:function(t){return this.data[t]},has:function(t){return null!=this.get(t)},set:function(t,e,n){var i=this.get(t);return i==e||(this.data[t]=e,n||(this.changed=!0,this.trigger("changed:"+t,[e,i]),this.trigger("changed",[t,e,i]))),this},inherit:function(e){return e instanceof jQuery&&(e=e.data()),t.extend(this.data,e),this},prop:function(){return this.$el.prop.apply(this.$el,arguments)},setup:function(e){t.extend(this,e)},initialize:function(){},addElements:function(t){Line truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
+1
@@ -0,0 +1 @@
|
||||
(()=>{"use strict";const e={context:{postId:0,postType:""},fields:{},values:{},savedValues:{},nameToKey:{},fieldGroups:[],initialized:!1,syncing:!1},t=e=>null===e||"object"!=typeof e?e:JSON.parse(JSON.stringify(e)),n=(e,t,i)=>{if(0===t.length)return i;const s=t[0],a=e??{},r=Array.isArray(a)?[...a]:{...a};return r[s]=n(r[s],t.slice(1),i),r},i=(e,t)=>{if(t)return e.fields[t]?t:e.nameToKey[t]},s=(s=e,a)=>{switch(a.type){case"INITIALIZE_STORE":{const e={},n=a.fields??{};for(const t of Object.keys(n)){const i=n[t];i.name&&(e[i.name]=t)}return{...s,context:a.context??s.context,fields:n,values:a.values??{},savedValues:t(a.values??{}),nameToKey:e,fieldGroups:a.fieldGroups??[],initialized:!0}}case"REGISTER_FIELD_GROUP":{const e=a.fields??{},n={...s.fields,...e},i={};for(const e of Object.keys(n)){const t=n[e];t.name&&(i[t.name]=e)}const r=a.values??{},o={...s.values},l={...s.savedValues};for(const e of Object.keys(r))e in o||(o[e]=r[e]),e in l||(l[e]=t(r[e]));const c=new Set(s.fieldGroups.map(e=>e.key)),f=(a.fieldGroups??[]).filter(e=>!c.has(e.key)),u=0===s.context.postId&&a.context?a.context:s.context;return{...s,context:u,fields:n,values:o,savedValues:l,nameToKey:i,fieldGroups:[...s.fieldGroups,...f],initialized:!0}}case"SET_FIELD_VALUE":{const e=i(s,a.fieldKey);return e?{...s,values:{...s.values,[e]:a.value}}:s}case"SET_VALUES":{const e={};for(const t of Object.keys(a.values)){const n=i(s,t);n&&(e[n]=a.values[t])}return{...s,values:{...s.values,...e}}}case"SET_SUB_FIELD_VALUE":{const e=i(s,a.parentKey);if(!e)return s;const t=s.values[e]??{},r=n(t,a.path,a.value);return{...s,values:{...s.values,[e]:r}}}case"ADD_REPEATER_ROW":{const e=i(s,a.fieldKey);if(!e)return s;let t=s.values[e];Array.isArray(t)||(t=[]);const n=[...t],r=a.rowData??{},o=a.index??n.length,l=Math.max(0,Math.min(o,n.length));return n.splice(l,0,r),{...s,values:{...s.values,[e]:n}}}case"REMOVE_REPEATER_ROW":{const e=i(s,a.fieldKey);if(!e)return s;const t=s.values[e];if(!Array.isArray(t))return s;if(a.rowIndex<0||a.rowIndex>=t.length)return s;const n=[...t];return n.splice(a.rowIndex,1),{...s,values:{...s.values,[e]:n}}}case"MOVE_REPEATER_ROW":{const e=i(s,a.fieldKey);if(!e)return s;const t=s.values[e];if(!Array.isArray(t))return s;if(a.fromIndex<0||a.fromIndex>=t.length||a.toIndex<0||a.toIndex>=t.length)return s;const n=[...t],[r]=n.splice(a.fromIndex,1);return n.splice(a.toIndex,0,r),{...s,values:{...s.values,[e]:n}}}case"MARK_AS_SAVED":return{...s,savedValues:t(s.values)};case"SET_SYNCING":return{...s,syncing:a.isSyncing};default:return s}},a={getFieldValue:(e,t)=>{const n=i(e,t);return n?e.values[n]:void 0},getFieldValueByKey:(e,t)=>e.values[t],getFieldValueByName:(e,t)=>{const n=e.nameToKey[t];return n?e.values[n]:void 0},getAllValues:e=>e.values,getAllValuesByName:e=>{const t={};for(const n of Object.keys(e.nameToKey)){const i=e.nameToKey[n];i in e.values&&(t[n]=e.values[i])}return t},getChangedValues:e=>{const t={};for(const n of Object.keys(e.values))JSON.stringify(e.values[n])!==JSON.stringify(e.savedValues[n])&&(t[n]=e.values[n]);return t},getField:(e,t)=>{const n=i(e,t);return n?e.fields[n]:void 0},getFields:e=>e.fields,getFieldsByGroup:(e,t)=>{const n={};for(const i of Object.keys(e.fields))e.fields[i].fieldGroupKey===t&&(n[i]=e.fields[i]);return n},getFieldKeyByName:(e,t)=>e.nameToKey[t],getSubFieldValue:(e,t,...n)=>{const s=i(e,t);if(!s)return;const a=e.values[s];return void 0===a?void 0:((e,t)=>{let n=e;for(const e of t){if(null==n)return;n=n[e]}return n})(a,n)},isInitialized:e=>e.initialized,isSyncing:e=>e.syncing,hasChanges:e=>JSON.stringify(e.values)!==JSON.stringify(e.savedValues),isDirty:(e,t)=>{const n=i(e,t);return!!n&&JSON.stringify(e.values[n])!==JSON.stringify(e.savedValues[n])},getContext:e=>e.context,getFieldGroups:e=>e.fieldGroups},r={initializeStore:e=>({type:"INITIALIZE_STORE",context:e.context,fields:e.fields,values:e.values,fieldGroups:e.fieldGroups}),registerFieldGroup:e=>({type:"REGISTER_FIELD_GROUP",context:e.context,fields:e.fields,values:e.values,fieldGroups:e.fieldGroups}),setFieldValue:(e,t)=>({type:"SET_FIELD_VALUE",fieldKey:e,value:t}),setValues:e=>({type:"SET_VALUES",values:e}),setSubFieldValue:(e,...t)=>{const n=t.pop();return{type:"SET_SUB_FIELD_VALUE",parentKey:e,path:t,value:n}},addRepeaterRow:(e,t,n)=>({type:"ADD_REPEATER_ROW",fieldKey:e,rowData:t,index:n}),removeRepeaterRow:(e,t)=>({type:"REMOVE_REPEATER_ROW",fieldKey:e,rowIndex:t}),moveRepeaterRow:(e,t,n)=>({type:"MOVE_REPEATER_ROW",fieldKey:e,fromIndex:t,toIndex:n}),markAsSaved:()=>({type:"MARK_AS_SAVED"}),setSyncing:e=>({type:"SET_SYNCING",isSyncing:e})},o="acf/fields";if(window.wp?.data?.createReduxStore){const e=wp.data.createReduxStore(o,{reducer:s,selectors:a,actions:r});wp.data.register(e)}const l=["repeater","group","flexible_content","clone"],c=e=>l.includes(e),f=new Set(["post_object","page_link","relationship","taxonomy","user"]),u=(e,t)=>{const n=e.get("type");if(!f.has(n))return[];const i=(e=>null==e||""===e||!1===e?[]:Array.isArray(e)?e.Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
(()=>{"use strict";const e="acf/fields",s=e=>!1!==e.supportsBindings&&!1!==e.allowInBindings,n=e=>{const s=typeof e;return"string"===s||"number"===s||"boolean"===s},i=e=>null==e?null:n(e)?String(e):Array.isArray(e)&&e.every(n)?e.join(", "):null;window.wp?.blocks?.registerBlockBindingsSource?wp.blocks.registerBlockBindingsSource({name:"acf/field",usesContext:["postType","postId"],getValues({select:s,bindings:n}){const t=s(e);if(!t.isInitialized())return{};const l={};for(const e of Object.keys(n)){const s=n[e].args?.key;if(!s)continue;const r=i(t.getFieldValue(s));null!==r&&(l[e]=r)}return l},setValues({select:i,dispatch:t,bindings:l}){const r=i(e);if(r.isInitialized())for(const i of Object.keys(l)){const o=l[i],c=o.args?.key;if(!c||void 0===o.newValue||!n(o.newValue))continue;const u=r.getField(c);u&&s(u)&&t(e).setFieldValue(c,o.newValue)}},canUserEditValue({select:i,args:t}){if(!t?.key)return!1;const l=i(e);if(!l.isInitialized())return!1;const r=l.getField(t.key);if(!r||!s(r))return!1;const o=l.getFieldValue(t.key);return!(null!=o&&!n(o))},getFieldsList({select:n}){const i=n(e);if(!i.isInitialized())return[];const t=i.getFields(),l=[];for(const e of Object.keys(t)){const n=t[e];s(n)&&l.push({label:n.label,args:{key:n.key},type:"string"})}return l}}):console.warn("ACF: wp.blocks.registerBlockBindingsSource is unavailable; ACF block bindings will not be registered. Requires WordPress 6.7+.")})();
|
||||
+1
@@ -0,0 +1 @@
|
||||
(()=>{var e={138(){jQuery,acf.jsxNameReplacements={"accent-height":"accentHeight",accentheight:"accentHeight","accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey","alignment-baseline":"alignmentBaseline",alignmentbaseline:"alignmentBaseline",allowedblocks:"allowedBlocks",allowfullscreen:"allowFullScreen",allowreorder:"allowReorder","arabic-form":"arabicForm",arabicform:"arabicForm",attributename:"attributeName",attributetype:"attributeType",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autoreverse:"autoReverse",autosave:"autoSave",basefrequency:"baseFrequency","baseline-shift":"baselineShift",baselineshift:"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode","cap-height":"capHeight",capheight:"capHeight",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className","clip-path":"clipPath","clip-rule":"clipRule",clippath:"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","color-interpolation":"colorInterpolation","color-interpolation-filters":"colorInterpolationFilters","color-profile":"colorProfile","color-rendering":"colorRendering",colorinterpolation:"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters",colorprofile:"colorProfile",colorrendering:"colorRendering",colspan:"colSpan",contenteditable:"contentEditable",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",diffuseconstant:"diffuseConstant",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback","dominant-baseline":"dominantBaseline",dominantbaseline:"dominantBaseline",edgemode:"edgeMode","enable-background":"enableBackground",enablebackground:"enableBackground",enctype:"encType",enterkeyhint:"enterKeyHint",externalresourcesrequired:"externalResourcesRequired","fill-opacity":"fillOpacity","fill-rule":"fillRule",fillopacity:"fillOpacity",fillrule:"fillRule",filterres:"filterRes",filterunits:"filterUnits","flood-color":"floodColor","flood-opacity":"floodOpacity",floodcolor:"floodColor",floodopacity:"floodOpacity","font-family":"fontFamily","font-size":"fontSize","font-size-adjust":"fontSizeAdjust","font-stretch":"fontStretch","font-style":"fontStyle","font-variant":"fontVariant","font-weight":"fontWeight",fontfamily:"fontFamily",fontsize:"fontSize",fontsizeadjust:"fontSizeAdjust",fontstretch:"fontStretch",fontstyle:"fontStyle",fontvariant:"fontVariant",fontweight:"fontWeight",for:"htmlFor",foreignobject:"foreignObject",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder","glyph-name":"glyphName","glyph-orientation-horizontal":"glyphOrientationHorizontal","glyph-orientation-vertical":"glyphOrientationVertical",glyphname:"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits","horiz-adv-x":"horizAdvX","horiz-origin-x":"horizOriginX",horizadvx:"horizAdvX",horizoriginx:"horizOriginX",hreflang:"hrefLang",htmlfor:"htmlFor","http-equiv":"httpEquiv",httpequiv:"httpEquiv","image-rendering":"imageRendering",imagerendering:"imageRendering",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keyparams:"keyParams",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",keytype:"keyType",lengthadjust:"lengthAdjust","letter-spacing":"letterSpacing",letterspacing:"letterSpacing","lighting-color":"lightingColor",lightingcolor:"lightingColor",limitingconeangle:"limitingConeAngle",marginheight:"marginHeight",marginwidth:"marginWidth","marker-end":"markerEnd","marker-mid":"markerMid","marker-start":"markerStart",markerend:"markerEnd",markerheight:"markerHeight",markermid:"markerMid",markerstart:"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",numoctaves:"numOctaves","overline-position":"overlinePosition","overline-thickness":"overlineThickness",overlineposition:"overlinePosition",overlinethickness:"overlineThickness","paint-order":"paintOrder",paintorder:"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",playsinline:"playsInline","pointer-events":"pointerEvents",pointerevents:"pointerLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
(()=>{var e={734(){!function(e){var t=acf.FieldSetting.extend({type:"clone",name:"display",render:function(){var e=this.field.val();this.$fieldObject.attr("data-display",e)}});acf.registerFieldSetting(t);var a=acf.FieldSetting.extend({type:"clone",name:"prefix_label",render:function(){var e="";this.field.val()&&(e=this.fieldObject.prop("label")+" "),this.$("code").html(e+"%field_label%")}});acf.registerFieldSetting(a);var l=acf.FieldSetting.extend({type:"clone",name:"prefix_name",render:function(){var e="";this.field.val()&&(e=this.fieldObject.prop("name")+"_"),this.$("code").html(e+"%field_name%")}});acf.registerFieldSetting(l),new acf.Model({filters:{select2_args:"select2Args"},select2Args:function(e,t,a,l,i){return"acf/fields/clone/query"==a.ajaxAction&&(e.closeOnSelect=!1,i.data.ajaxData=this.ajaxData),e},ajaxData:function(t){return t.fields={},acf.getFieldObjects().map(function(e){t.fields[e.prop("key")]={key:e.prop("key"),type:e.prop("type"),label:e.prop("label"),ancestors:e.getParents().length}}),t.title=e("#title").val(),t}})}(jQuery)},368(){var e,t;e=jQuery,t=acf.FieldSetting.extend({type:"flexible_content",name:"fc_layout",events:{"blur .layout-label":"onChangeLabel","blur .layout-name":"onChangeName","click .add-layout":"onClickAdd","click .acf-field-settings-fc_head":"onClickEdit","click .acf-field-setting-fc-duplicate":"onClickDuplicate","click .acf-field-setting-fc-delete":"onClickDelete","changed:layoutLabel":"updateLayoutTitles","changed:layoutName":"updateLayoutTitles"},$input:function(t){return e("#"+this.getInputId()+"-"+t)},$list:function(){return this.$(".acf-field-list:first")},getInputId:function(){return this.fieldObject.getInputId()+"-layouts-"+this.field.get("id")},getFields:function(){return acf.getFieldObjects({parent:this.$el})},getChildren:function(){return acf.getFieldObjects({list:this.$list()})},initialize:function(){var e=this.$el.parent();e.css("position","relative"),e.hasClass("ui-sortable")||e.sortable({items:"> .acf-field-setting-fc_layout",handle:".acf-fc_draggable",zIndex:9999,forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,stop:this.proxy(function(e,t){this.fieldObject.save()})}),this.updateFieldLayouts(),this.updateLayoutTitles()},updateFieldLayouts:function(){this.getChildren().map(this.updateFieldLayout,this)},updateFieldLayout:function(e){e.prop("parent_layout",this.get("id"))},updateLayoutTitles:function(){const e=this.get("layoutLabel"),t=this.get("layoutName"),a=this.$el.find("> .acf-label .acf-fc-layout-label");e&&a.text(acf.decode(e));const l=this.$el.find("> .acf-label .acf-fc-layout-name span");t?(l.text(t),l.parent().css("display","")):l.parent().css("display","none")},onClickEdit:function(t){const a=e(t.target);a.hasClass("acf-btn")||a.hasClass("copyable")||a.parent().hasClass("acf-btn")||a.parent().hasClass("copyable")||(this.isOpen()?this.close():this.open())},isOpen:function(e){return this.$el.children(".acf-field-layout-settings").hasClass("open")},open:function(e,t){const a=e?e.children(".acf-field-settings-fc_head"):this.$el.children(".acf-field-settings-fc_head"),l=e?e.children(".acf-field-layout-settings"):this.$el.children(".acf-field-layout-settings"),i=e?e.find(".toggle-indicator").first():this.$el.find(".toggle-indicator").first();acf.doAction("show",l),t?l.slideDown({complete:function(){l.find(".layout-label").trigger("focus")}}):l.slideDown(),i.addClass("open"),i.hasClass("closed")&&i.removeClass("closed"),l.addClass("open"),a.addClass("open")},close:function(){const e=this.$el.children(".acf-field-settings-fc_head"),t=this.$el.children(".acf-field-layout-settings"),a=this.$el.find(".toggle-indicator").first();t.slideUp(),t.removeClass("open"),a.removeClass("open"),e.removeClass("open"),a.hasClass("closed")||a.addClass("closed"),acf.doAction("hide",t)},onChangeLabel:function(e,t){let a=t.val();const l=acf.strEscape(a);this.set("layoutLabel",l),this.$el.attr("data-layout-label",l);let i=this.$input("name");""==i.val()&&(acf.val(i,acf.strSanitize(a)),this.$el.find(".layout-name").trigger("blur"))},onChangeName:function(e,t){const a=acf.strSanitize(t.val(),!1);t.val(a),this.set("layoutName",a),this.$el.attr("data-layout-name",a)},onClickAdd:function(e,t){e.preventDefault();var a=this.get("id"),l=acf.uniqid("layout_");$layout=acf.duplicate({$el:this.$el,search:a,replace:l,after:function(e,t){var a=t.find(".acf-field-list:first");a.children(".acf-field-object").remove(),a.addClass("-empty"),t.attr("data-layout-label",""),t.attr("data-layout-name",""),t.find(".acf-fc-meta input").val(""),t.find("label.acf-fc-layout-label").html(acf.__("Layout"))}});var i=acf.getFieldSetting($layout);i.$input("key").val(l),this.isOpen()?i.$el.find(".layout-label").trigger("focus"):this.open(i.$el,!0),this.fieldObject.save()},onClickDuplicate:function(e,t){e.preventDefault();var a=this.get("id"),l=acf.uniqid("layout_");$layout=acf.duplicate({$el:this.$el,search:a,replace:l});var i=acf.getFieldObjects({parent:$layout});i.length&&(i.map(function(e){e.wipe(),e.iLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
(()=>{var t={340(){!function(t){var e=acf.Field.extend({type:"flexible_content",wait:"",events:{'click [data-name="add-layout"]':"onClickAdd",'click [data-name="duplicate-layout"]':"onClickDuplicate",'click [data-name="collapse-layout"]':"onClickCollapse",'click [data-name="remove-layout"]':"onClickRemove",'click [data-name="more-layout-actions"]':"onClickMoreActions","click .acf-fc-expand-all":"onClickExpandAll","click .acf-fc-collapse-all":"onClickCollapseAll",showField:"onShow",unloadField:"onUnload",mouseover:"onHover"},$control:function(){return this.$(".acf-flexible-content:first")},$layoutsWrap:function(){return this.$(".acf-flexible-content:first > .values")},$layouts:function(){return this.$(".acf-flexible-content:first > .values > .layout")},$layout:function(t){return this.$(".acf-flexible-content:first > .values > .layout:eq("+t+")")},$clonesWrap:function(){return this.$(".acf-flexible-content:first > .clones")},$clones:function(){return this.$(".acf-flexible-content:first > .clones > .layout")},$clone:function(t){return this.$('.acf-flexible-content:first > .clones > .layout[data-layout="'+t+'"]')},$actions:function(){return this.$(".acf-actions:last")},$button:function(){return this.$(".acf-fc-top-actions:first .button, .acf-actions:last .button")},$popup:function(){return this.$(".tmpl-popup:last")},$moreLayoutActions:function(){return this.$(".tmpl-more-layout-actions:last")},getPopupHTML:function(){var e=this.$popup().html(),a=t(e),i=this;return a.find("[data-layout]").each(function(){var e=t(this),a=e.data("min")||0,n=e.data("max")||0,o=e.data("layout")||"",s=i.countLayouts(o);if(n&&s>=n)e.addClass("disabled");else if(a&&s<a){var l=a-s,r=acf.__("{required} {label} {identifier} required (min {min})"),c=acf._n("layout","layouts",l);r=(r=(r=(r=r.replace("{required}",l)).replace("{label}",o)).replace("{identifier}",c)).replace("{min}",a),e.append('<span class="badge" title="'+r+'">'+l+"</span>")}}),a.outerHTML()},getMoreLayoutActionsHTML:function(){return this.$moreLayoutActions().html()},getValue:function(){return this.$layouts().length},allowRemove:function(){var t=parseInt(this.get("min"));return!t||t<this.val()},allowAdd:function(){return!this.isFull()},isFull:function(){const t=parseInt(this.get("max"));return t&&this.countLayouts()>=t},addSortable:function(t){1!=this.get("max")&&this.$layoutsWrap().sortable({items:"> .layout",handle:"> .acf-fc-layout-actions-wrap .acf-fc-layout-handle",forceHelperSize:!0,zIndex:9999,forcePlaceholderSize:!0,scroll:!0,stop:function(e,a){t.render()},update:function(e,a){t.$input().trigger("change")}})},addCollapsed:function(){var e=s.load(this.get("key"));if(!e)return!1;this.$layouts().each(function(a){e.indexOf(a)>-1&&t(this).addClass("-collapsed")})},addUnscopedEvents:function(e){this.on("invalidField",".layout",function(a){e.onInvalidField(a,t(this))}),t(document).on("click focusin",function(a){t(a.target).closest(".acf-flexible-content .layout").length||e.setActiveLayout(t([]))})},initialize:function(){this.addUnscopedEvents(this),this.addCollapsed(),acf.disable(this.$clonesWrap(),this.cid),this.render()},render:function(){this.$layouts().each(function(e){t(this).find(".acf-fc-layout-order:first").html(e+1)});const e=this;this.$control().on("click focus","> .values > .layout",function(a){const i=t(a.target).closest(".layout");e.setActiveLayout(i)}),0==this.val()?this.$control().addClass("-empty"):this.$control().removeClass("-empty"),this.maybeDisableAddLayout()},maybeDisableAddLayout:function(){const e=this,a=this.isFull(),i=this.$control().data("button-label"),n=acf.__("Duplicate"),o=acf.__("Maximum rows reached ({max})").replace("{max}",this.get("max"));a?this.$button().addClass("disabled"):this.$button().removeClass("disabled"),this.$layouts().each(function(){const s=t(this),l=s.find('[data-name="add-layout"]:first'),r=s.find('[data-name="duplicate-layout"]:first'),c=s.data("max")||0,d=t(".acf-toggle-layout.enable");if(a?(l.addClass("disabled").attr("title",o),r.addClass("disabled").attr("title",o),d.addClass("disabled")):(l.removeClass("disabled").attr("title",i),r.removeClass("disabled").attr("title",n),d.removeClass("disabled")),c){const t=s.data("layout")||"";if(e.countLayouts(t)>=c){const e=acf.__("Maximum {label} {identifier} reached ({max})").replace("{label}",t).replace("{identifier}",acf._n("layout","layouts",c)).replace("{max}",c);r.addClass("disabled").attr("title",e),d.addClass("disabled")}}})},setActiveLayout:function(e){t(".layout").removeClass("active-layout"),e.length&&e.addClass("active-layout")},onShow:function(t,e,a){var i=acf.getFields({is:":visible",parent:this.$el});acf.doAction("show_fields",i)},countLayouts:function(e){return this.$layouts().filter(function(){const a=t(this);return(!e||a.data("layout")===e)&&"0"!==a.attr("data-enabled")}).length},countLayoutsByName:function(t){const e=t.data("max");if(!e)return!0;const a=t.data("layout")||"";if(this.countLayouts(a)>=e){let a=acf.__("This field has a limit of {max} {label} {Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
(()=>{var e={805(){!function(e){const t=function(t){return void 0===t.element?t:t.children&&"None"===t.text?void 0:("acfOptionsPages"===t.text&&(t.text=acf.__("Options Pages")),e('<span class="acf-selection"></span>').data("element",t.element).html(acf.strEscape(t.text)))},a=function(t){if(void 0===t.element)return t;const a=e('<span class="acf-selection"></span>');return a.html(acf.strEscape(t.element.innerHTML)),"options"!==t.id&&"edit_posts"!==t.id||a.append('<span class="acf-select2-default-pill">'+acf.__("Default")+"</span>"),a.data("element",t.element),a};new acf.Model({id:"UIOptionsPageManager",wait:"ready",events:{"change .acf-options-page-parent_slug":"toggleMenuPositionDesc"},initialize:function(){"ui_options_page"===acf.get("screen")&&(acf.newSelect2(e("select.acf-options-page-parent_slug"),{field:!1,templateSelection:t,templateResult:t,dropdownCssClass:"field-type-select-results"}),acf.newSelect2(e("select.acf-options-page-capability"),{field:!1,templateSelection:a,templateResult:a}),acf.newSelect2(e("select.acf-options-page-data_storage"),{field:!1,templateSelection:a,templateResult:a}),this.toggleMenuPositionDesc())},toggleMenuPositionDesc:function(t,a){"none"===e("select.acf-options-page-parent_slug").val()?(e(".acf-menu-position-desc-child").hide(),e(".acf-menu-position-desc-parent").show()):(e(".acf-menu-position-desc-parent").hide(),e(".acf-menu-position-desc-child").show())}}),new acf.Model({id:"optionsPageModalManager",events:{"change .location-rule-value":"createOptionsPage"},createOptionsPage:function(a){const n=e(a.target);if("add_new_options_page"!==n.val())return;let o=!1;const s=function(a){o=acf.newPopup({title:a.data.title,content:a.data.content,width:"600px"}),o.$el.addClass("acf-create-options-page-popup");const n=o.$el.find("#acf_ui_options_page-page_title"),s=n.val();n.trigger("focus").val("").val(s),acf.newSelect2(e("#acf_ui_options_page-parent_slug"),{field:!1,templateSelection:t,templateResult:t,dropdownCssClass:"field-type-select-results"}),o.on("submit","form",c)},c=function(t){t.preventDefault(),acf.validateForm({form:e("#acf-create-options-page-form"),success:i,failure:l})},i=function(){const t=e("#acf-create-options-page-form").serializeArray(),a={action:"acf/create_options_page"};t.forEach(e=>{a[e.name]=e.value}),e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",success:p})},l=function(t){const a=e("#acf-create-options-page-form"),n=a.find(".acf-field .acf-error-message");a.find(".acf-notice").first().remove(),n.each(function(){const t=e(this).closest(".acf-field").find(".acf-label:first");e(this).attr("class","acf-options-page-modal-error").appendTo(t)})},p=function(e){e.success&&e.data.menu_slug?(n.prepend('<option value="'+e.data.menu_slug+'">'+e.data.page_title+"</option>"),n.val(e.data.menu_slug),o.close()):!e.success&&e.data.error&&alert(e.data.error)};!function(){const t=e(".acf-headerbar-title-field").val(),a={action:"acf/create_options_page",acf_parent_page_choices:this.acf.data.optionPageParentOptions?this.acf.data.optionPageParentOptions:[]};t.length&&(a.field_group_title=t),e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",success:s})}()}})}(jQuery)}},t={};function a(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,a),s.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";a(805)})()})();
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
Reference in new issue
Block a user