Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/plugins/all-in-one-seo-pack/dist/Lite/assets/primary-term.38588311.js
Назад
import{v as m,o as _,c as g,C as p,a as u,E as x,b as E,Y as k}from"./js/runtime-dom.esm-bundler.6789c400.js";import{l as v}from"./js/index.3eb8f806.js";import{l as $}from"./js/index.ee8124c6.js";import{l as B}from"./js/index.1ca84f0e.js";import{c as d,u as b,B as T,e as A,l as P,z as L,A as C}from"./js/index.5a710757.js";import{e as D}from"./js/elemLoaded.5e0343ce.js";import{s as I}from"./js/metabox.1128ddb8.js";import{S as M}from"./js/Information.82968754.js";import{S as N}from"./js/Caret.662da1f3.js";import"./js/translations.12335a6a.js";import{_ as S}from"./js/_plugin-vue_export-helper.249dac1d.js";import{s as y,_ as w}from"./js/default-i18n.54b5d8cd.js";import"./js/helpers.f95d5840.js";const H={getTerms:async e=>{const{apiFetch:o}=window.wp,{addQueryArgs:t}=window.wp.url,n=c(e);return await o({path:t(`/wp/v2/${n.restBase}`,{per_page:-1,orderby:"count",order:"desc",_fields:"id,name"})})},getSelectedTerms:e=>{const o=c(e);return window.wp.data.select("core/editor").getEditedPostAttribute(o.restBase)||[]}},q={getTerms:async e=>{var r;const o=[],t=c(e);return(((r=document.getElementById(`${t.name}checklist`))==null?void 0:r.querySelectorAll("li"))||[]).forEach(s=>{const a=s.querySelector("input").value,i=s.querySelector("label").innerText;o.push({id:parseInt(a,10),name:i.trim()})}),new Promise(s=>{s(o)})},getSelectedTerms:e=>{var r;const o=[],t=c(e);return(((r=document.getElementById(`${t.name}checklist`))==null?void 0:r.querySelectorAll("input:checked"))||[]).forEach(s=>{o.push(parseInt(s.value,10))}),o}},l=()=>{var t;return d(),(((t=b().aioseo.postData)==null?void 0:t.taxonomies)||[]).filter(n=>n.primaryTermSupport===!0)},U=e=>l().some(o=>e===o.name),c=e=>{const o=l().filter(t=>e===t.name);return o.length?o[0]:{}},V=e=>T()?H.getSelectedTerms(e):q.getSelectedTerms(e),f="all-in-one-seo-pack",F={setup(){return{postEditorStore:A()}},components:{SvgCircleInformation:M,SvgClose:N},props:{taxonomy:String},data(){return{selectedTerms:[],strings:{didYouKnow:y(w("Did you know that %1$s Pro allows you to choose a %2$sprimary category%3$s for your posts? This feature works hand in hand with our powerful Breadcrumbs template to give you full navigational control to help improve your search rankings!",f),"AIOSEO","<strong>","</strong>"),learnMoreLink:y('<a href="%1$s" target="_blank" rel="noreferrer nofollow">%2$s<span class="link-right-arrow"> →</span></a>',P.getDocUrl("primaryTerm"),w("Learn more",f))}}},computed:{canShowUpsell(){const{options:e}=this.postEditorStore.currentPost;return!e.primaryTerm.productEducationDismissed&&1<this.selectedTerms.length}},methods:{updateSelectedTerms(){this.selectedTerms=V(this.taxonomy)}},mounted(){this.updateSelectedTerms(),window.aioseoBus.$on("updateSelectedTerms",this.updateSelectedTerms)},beforeUnmount(){window.aioseoBus.$off("updateSelectedTerms",this.updateSelectedTerms)}},Y={key:0,class:"aioseo-primary-term-cta"},K=["innerHTML"],O=["innerHTML"];function Q(e,o,t,n,r,s){const a=m("svg-circle-information"),i=m("svg-close");return s.canShowUpsell?(_(),g("div",Y,[p(a,{width:"15",height:"15"}),u("p",{innerHTML:r.strings.didYouKnow},null,8,K),u("p",{innerHTML:r.strings.learnMoreLink},null,8,O),p(i,{onClick:x(n.postEditorStore.disablePrimaryTermEducation,["stop"])},null,8,["onClick"])])):E("",!0)}const R=S(F,[["render",Q]]),j={components:{PrimaryTerm:R},props:{taxonomy:String}},z={class:"aioseo-app aioseo-primary-term"};function G(e,o,t,n,r,s){const a=m("primary-term");return _(),g("div",z,[p(a,{taxonomy:t.taxonomy},null,8,["taxonomy"])])}const J=S(j,[["render",G]]);if(T()&&window.wp){const{createElement:e,Fragment:o}=window.wp.element,{addFilter:t}=window.wp.hooks,{createHigherOrderComponent:n}=window.wp.compose,{subscribe:r}=window.wp.data;t("editor.PostTaxonomyType","aioseo/primary-term",n(s=>a=>{const{slug:i}=a;return U(i)?e(o,{},e(s,a),e("div",{id:`aioseo-primary-term-${i}`},e("div",{className:"aioseo-primary-term-app",taxonomy:i}))):e(s,a)},"withInspectorControls")),r(()=>{window.aioseoBus.$emit("updateSelectedTerms")})}(L()||C())&&(d(),l().forEach(e=>{var n;const o=(n=document.getElementById(`${e.name}div`))==null?void 0:n.querySelector(".inside");if(!o)return;const t=document.createElement("div");t.setAttribute("id",`aioseo-primary-term-${e.name}`),t.setAttribute("class","aioseo-primary-term-app"),t.setAttribute("taxonomy",e.name),o.append(t),function(r){r(`#${e.name}checklist`).on("change",'input[type="checkbox"]',()=>{window.aioseoBus.$emit("updateSelectedTerms")}),r(`#${e.name}checklist`).on("wpListAddEnd",()=>{window.aioseoBus.$emit("updateSelectedTerms")})}(window.jQuery)}));const h=e=>{if(!e)return;const o=e.getAttribute("taxonomy");let t=k({...J,name:"Standalone/PrimaryTerm"},{taxonomy:o});t=v(t),t=$(t),t=B(t),d(t),t.mount(e)};if(I()&&window.aioseo&&window.aioseo.currentPost&&window.aioseo.currentPost.context==="post"){const e=document.getElementsByClassName("aioseo-primary-term-app");Array.prototype.forEach.call(e,o=>h(o)),D(".aioseo-primary-term-app","aioseoPrimaryTerm"),document.addEventListener("animationstart",function(o){o.animationName==="aioseoPrimaryTerm"&&h(o.target)},{passive:!0})}
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка