관리-도구
편집 파일: limit-modified-date.ji74sqtb.js
import{o as r,c as l,a as e,Q as h,Z as g,b as m,t as P,Y as S}from"./js/runtime-dom.esm-bundler.h3clfjuw.js";import{l as x}from"./js/index.njux2kgl.js";import{l as b}from"./js/index.cw7tfyil.js";import{l as k}from"./js/index.moogjen0.js";import{C as E,J as a,U as y,o as L}from"./js/index.lqcu3hi3.js";import{e as v}from"./js/elemLoaded.f718isk5.js";import"./js/translations.e22mvhfh.js";import{_ as B}from"./js/_plugin-vue_export-helper.oebm7xum.js";import{_ as D}from"./js/default-i18n.bz7purh4.js";import"./js/Caret.g6s6s7gs.js";import"./js/cleanForSlug.etvx808q.js";const M="all-in-one-seo-pack",A={emits:["standalone-update-post"],setup(){return{postEditorStore:E()}},data(){return{strings:{label:D("Don't update the modified date",M)}}},watch:{"postEditorStore.currentPost.limit_modified_date"(t){window.aioseoBus.$emit("standalone-update-post",{limit_modified_date:t})}},computed:{canShowSvg(){return a()&&this.postEditorStore.currentPost.limit_modified_date}},methods:{addLimitModifiedDateAttribute(){a()&&window.wp.data.dispatch("core/editor").editPost({aioseo_limit_modified_date:this.postEditorStore.currentPost.limit_modified_date})}}},C={key:0},I={class:"components-checkbox-control__input-container"},V={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img",class:"components-checkbox-control__checked","aria-hidden":"true",focusable:"false"},N=e("path",{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"},null,-1),U=[N],z={class:"components-checkbox-control__label",for:"aioseo-limit-modified-date-input"};function J(t,o,d,i,w,n){return i.postEditorStore.currentPost.id?(r(),l("div",C,[e("span",I,[h(e("input",{id:"aioseo-limit-modified-date-input",class:"components-checkbox-control__input",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=s=>i.postEditorStore.currentPost.limit_modified_date=s),onChange:o[1]||(o[1]=(...s)=>n.addLimitModifiedDateAttribute&&n.addLimitModifiedDateAttribute(...s))},null,544),[[g,i.postEditorStore.currentPost.limit_modified_date]]),n.canShowSvg?(r(),l("svg",V,U)):m("",!0)]),e("label",z,P(w.strings.label),1)])):m("",!0)}const Q=B(A,[["render",J]]);var u,p,_,f;if(a()&&window.wp){const{createElement:t}=window.wp.element,{registerPlugin:o}=window.wp.plugins,d=((p=(u=window.wp)==null?void 0:u.editor)==null?void 0:p.PluginPostStatusInfo)||((f=(_=window.wp)==null?void 0:_.editPost)==null?void 0:f.PluginPostStatusInfo);o("aioseo-limit-modified-date",{render:()=>t(d,{},t("div",{id:"aioseo-limit-modified-date"}))})}const c=()=>{let t=S({...Q,name:"Standalone/LimitModifiedDate"});t=x(t),t=b(t),t=k(t),L(t),t.mount("#aioseo-limit-modified-date")};y()&&window.aioseo&&window.aioseo.currentPost&&window.aioseo.currentPost.context==="post"&&(document.getElementById("aioseo-limit-modified-date")?c():(v("#aioseo-limit-modified-date","aioseoLimitModifiedDate"),document.addEventListener("animationstart",function(o){o.animationName==="aioseoLimitModifiedDate"&&c()},{passive:!0})));