| 1 |
!function(){"use strict";var e={d:function(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:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(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:function(){return c},name:function(){return d},settings:function(){return u}});var 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")}]);var n=window.wp.element,l=window.wp.blockEditor,s=window.wp.components,o=window.wp.primitives,i=(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.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"}));const 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"}};var c=JSON.parse('{"apiVersion":2,"name":"learnpress/template","category":"learnpress","attributes":{"template":{"type":"string","default":""}}}');const{name:d}=c,u={title:"LearnPress Template",keywords:["learnpress","template"],description:(0,a.__)("Renders LearnPress PHP templates.","learnpress"),icon:"archive",edit:function(e){var t,r;let{attributes:o}=e;const c=(0,l.useBlockProps)(),d=null!==(t=null===(r=p[o.template])||void 0===r?void 0:r.title)&&void 0!==t?t:o.template;return(0,n.createElement)("div",c,(0,n.createElement)(s.Placeholder,{icon:i,label:d,className:"wp-block-learnpress-template__placeholder"},(0,n.createElement)("div",{className:"wp-block-learnpress-template__placeholder-inner"},(0,a.sprintf)( |
| 3 |
(0,a.__)("This is an editor placeholder for the %s. On your store this will be replaced by the template and display with your course image(s), title, price, etc. You can move this placeholder around and add further blocks around it to extend the template.","learnpress"),d))))},save:()=>null};[t].forEach((e=>{if(!e)return;const{metadata:t,settings:a,name:n}=e;(0,r.registerBlockType)(n,{...t,...a})}))}(); |