| 1 |
(()=>{"use strict";var e={d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{metadata:()=>c,name:()=>d,settings:()=>m});const r=window.wp.blocks,a=window.wp.i18n;(0,r.setCategories)([...(0,r.getCategories)().filter((e=>{let{slug:t}=e;return"learnpress"!==t})),{slug:"learnpress",title:(0,a.__)("LearnPress","learnpress")}]);const s=window.wp.element,l=window.wp.blockEditor,n=window.wp.components,o=window.wp.primitives,i=(0,s.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(o.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),p={"single-course":{title:(0,a.__)("LearnPress Single Course Template","learnpress"),placeholder:"single-course"},"archive-course":{title:(0,a.__)("LearnPress Course Archive Template","learnpress"),placeholder:"archive-course"}},c=JSON.parse('{"apiVersion":2,"name":"learnpress/template","category":"learnpress","attributes":{"template":{"type":"string","default":""}}}'),{name:d}=c,m={title:"LearnPress Template",keywords:["learnpress","template"],description:(0,a.__)("Renders LearnPress PHP templates.","learnpress"),icon:"archive",edit:function(e){var t;let{attributes:r}=e;const o=(0,l.useBlockProps)(),c=null!==(t=p[r.template]?.title)&&void 0!==t?t:r.template;return(0,s.createElement)("div",o,(0,s.createElement)(n.Placeholder,{icon:i,label:c,className:"wp-block-learnpress-template__placeholder"},(0,s.createElement)("div",{className:"wp-block-learnpress-template__placeholder-inner"},(0,a.sprintf)(/* translators: %s is the template title */ |
| 2 |
(0,a.__)("This is an editor placeholder for the %s. This will be replaced by the template in your store and displayed with your course image(s), title, price, and so on. You can move this placeholder around and add further blocks around it to extend the template.","learnpress"),c))))},save:()=>null};[t].forEach((e=>{if(!e)return;const{metadata:t,settings:a,name:s}=e;(0,r.registerBlockType)(s,{...t,...a})}))})(); |