Changeset 3448134
- Timestamp:
- 01/27/2026 06:51:26 PM (2 months ago)
- Location:
- share-one/trunk
- Files:
-
- 8 added
- 2 deleted
- 7 edited
-
. (modified) (1 prop)
-
assets/Share-One-Carousel.svg (added)
-
assets/Share-One-Video.svg (added)
-
assets/Share-One-WOL.svg (added)
-
assets/elementor-share-one-icons.css (added)
-
build/index.asset.php (modified) (1 diff)
-
build/index.js (modified) (1 diff)
-
elementor-widgets (added)
-
elementor-widgets/carousel-catch-elementor-widget.php (added)
-
elementor-widgets/inline-catch-elementor-widget.php (added)
-
elementor-widgets/wall-of-love-elementor-widget.php (added)
-
inline-catch-elementor-widget.php (deleted)
-
package-lock.json (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
share-one.php (modified) (8 diffs)
-
src/index.js (modified) (4 diffs)
-
wall-of-love-elementor-widget.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
share-one/trunk
-
Property
svn:ignore
set to
node_modules
-
Property
svn:ignore
set to
-
share-one/trunk/build/index.asset.php
r3255883 r3448134 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks' ), 'version' => '1699766586bc711261c5');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '041d6efc28dc8738547b'); -
share-one/trunk/build/index.js
r3255883 r3448134 1 (()=>{"use strict";const e=window.wp.blocks, i=window.wp.blockEditor,t=window.ReactJSXRuntime;(0,e.registerBlockType)("share-one/wall-of-love",{title:"Share.one - Wall of Love",icon:"heart",category:"widgets",edit(){const e=Math.random().toString(36).substring(7),{serverUrl:s,uuid:r}=shareOneData;return setTimeout((()=>{const i=`${s}/walloflove/${r}.js?div_id=${e}`,t=document.createElement("script");t.src=i,t.defer=!0,document.body.appendChild(t)}),1e3),(0,t.jsx)("div",{...(0,i.useBlockProps)(),children:r?(0,t.jsx)("p",{id:e}):(0,t.jsx)("p",{children:(0,t.jsx)("em",{children:"No UUID defined in Share.one settings."})})})},save:()=>(0,t.jsx)("div",{...i.useBlockProps.save(),children:(0,t.jsx)("p",{children:"[share_one_wall_of_love]"})})}),(0,e.registerBlockType)("share-one/catch-widget",{title:"Share.one - Inline Catch widget",icon:"heart",category:"widgets",edit(){const e=Math.random().toString(36).substring(7),{serverUrl:s,uuid:r}=shareOneData;return setTimeout((()=>{const i=`${s}/inline-widget/${r}.js?div_id=${e}`,t=document.createElement("script");t.src=i,t.defer=!0,document.body.appendChild(t)}),1e3),(0,t.jsx)("div",{...(0,i.useBlockProps)(),children:r?(0,t.jsx)("p",{id:e}):(0,t.jsx)("p",{children:(0,t.jsx)("em",{children:"No UUID defined in Share.one settings."})})})},save:()=>(0,t.jsx)("div",{...i.useBlockProps.save(),children:(0,t.jsx)("p",{children:"[share_one_catch_widget]"})})})})();1 (()=>{"use strict";const e=window.wp.blocks,t=window.wp.element,s=window.wp.blockEditor,i=window.wp.components,r=window.wp.i18n,l=window.ReactJSXRuntime,n=(0,l.jsxs)("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",version:"1.1",id:"svg11",children:[(0,l.jsx)("defs",{id:"defs11"}),(0,l.jsx)("path",{style:{fill:"#000000"},d:"M 11.322377,31.65268 V 14.784429 H 31.207812 51.093247 V 31.65268 48.520932 H 31.207812 11.322377 Z m 7.1294,12.010475 v -2.248323 h -2.061934 -2.061934 v 2.248323 2.248324 h 2.061934 2.061934 z m 29.635939,0 v -2.248323 h -2.061934 -2.061935 v 2.248323 2.248324 h 2.061935 2.061934 z M 18.44607,37.646268 18.44017,35.415419 H 16.389885 14.3396 l -0.0059,2.230849 -0.0059,2.23085 h 2.062168 2.062169 z m 29.635938,0 -0.0059,-2.230849 h -2.050285 -2.050286 l -0.0059,2.230849 -0.0059,2.23085 h 2.062169 2.062168 z m -21.518432,1.011517 c 0.209317,-0.11962 0.516873,-0.296383 0.683458,-0.392808 0.287389,-0.166349 0.656997,-0.379025 3.04048,-1.749519 0.557421,-0.320516 1.406659,-0.810254 1.887194,-1.088308 0.480536,-0.278054 1.230171,-0.71055 1.665857,-0.961103 0.435685,-0.250552 0.959906,-0.552456 1.164934,-0.670898 0.205029,-0.118441 0.503835,-0.290818 0.664013,-0.383059 0.160179,-0.09224 0.825939,-0.47681 1.479467,-0.854598 0.653529,-0.377788 1.350742,-0.779533 1.549363,-0.892767 0.198622,-0.113233 0.375003,-0.218451 0.391959,-0.233818 0.03707,-0.0336 0.04554,-0.02841 -1.824828,-1.116724 -0.743229,-0.432462 -1.508591,-0.878194 -1.700805,-0.990514 -0.337597,-0.197275 -0.717641,-0.417148 -2.003688,-1.159227 -0.333171,-0.192247 -0.946509,-0.546738 -1.362973,-0.787757 -0.416464,-0.241019 -1.061256,-0.61282 -1.43287,-0.826225 -0.371614,-0.213405 -0.953499,-0.548631 -1.293077,-0.744947 -0.339579,-0.196317 -0.790409,-0.456766 -1.001844,-0.578778 -0.451859,-0.26075 -1.174781,-0.679003 -1.832654,-1.060298 -0.258323,-0.149721 -0.475875,-0.27222 -0.483447,-0.27222 -0.01899,0 -0.01745,13.329321 0.0016,14.243349 0.0085,0.40574 0.01807,0.737708 0.02133,0.737708 0.0033,0 0.177174,-0.09787 0.38649,-0.217489 z M 18.451777,31.65268 v -2.236674 h -2.061934 -2.061934 v 2.236674 2.236675 h 2.061934 2.061934 z m 29.635939,0 v -2.236674 h -2.061934 -2.061935 v 2.236674 2.236675 h 2.061935 2.061934 z m -29.641646,-5.993588 0.0059,-2.230849 h -2.06201 -2.062051 v 2.221142 c 0,1.221628 0.007,2.228188 0.01566,2.2368 0.0086,0.0086 0.933861,0.01298 2.056109,0.0097 l 2.040451,-0.006 z m 29.635938,0 0.0059,-2.230849 h -2.062051 -2.062052 v 2.221142 c 0,1.221628 0.007,2.228188 0.01566,2.2368 0.0086,0.0086 0.933862,0.01298 2.05611,0.0097 l 2.040451,-0.006 z M 18.451777,19.642206 v -2.248324 h -2.061934 -2.061934 v 2.248324 2.248323 h 2.061934 2.061934 z m 29.635939,0 v -2.248324 h -2.061934 -2.061935 v 2.248324 2.248323 h 2.061935 2.061934 z",id:"path1"}),(0,l.jsx)("path",{d:"m 20.990146,12.712514 c -1.997501,0 -3.61621,1.619907 -3.61621,3.616264 0,1.996302 1.619853,3.61621 3.61621,3.61621 1.996302,0 3.61621,-1.618709 3.61621,-3.61621 0,-1.997555 -1.619908,-3.616264 -3.61621,-3.616264 z",fill:"#e5503c",id:"path10",style:{strokeWidth:.544946}}),(0,l.jsx)("path",{d:"m 17.259879,22.659039 c -0.118853,-0.462333 -0.327077,-0.889353 -0.604673,-1.259916 -0.659985,-0.882323 -1.712821,-1.452827 -2.898624,-1.452827 -1.997501,0 -3.61621,-1.618709 -3.61621,-3.61621 0,-1.997556 1.619853,-3.616264 3.61621,-3.616264 1.996302,0 3.61621,-1.618709 3.61621,-3.6161885 0,-1.9975065 -1.618709,-3.6185662 -3.61621,-3.6185662 -1.997501,0 -3.61621,1.6187109 -3.61621,3.616212 0,1.9974897 -1.6199079,3.6161987 -3.6162265,3.6161987 -1.9963294,0 -3.6173924,1.619908 -3.6173924,3.617409 0,1.997501 1.6198859,3.61621 3.6162154,3.61621 1.9963512,0 3.6162045,1.619908 3.6162045,3.61621 0,1.996356 -1.6198533,3.61621 -3.6162045,3.61621 -1.9963295,0 -3.6162154,1.621052 -3.6162154,3.618553 0,1.997555 1.6198859,3.616264 3.6162154,3.616264 1.9963512,0 3.6162045,-1.619907 3.6162045,-3.616264 0,-1.996302 1.619908,-3.61621 3.61621,-3.61621 1.185803,0 2.238694,-0.570504 2.898624,-1.452827 0.27765,-0.371708 0.485874,-0.797584 0.604673,-1.259916 0.01531,-0.0576 0.02823,-0.116455 0.04,-0.175255 0.04823,-0.235308 0.07291,-0.47879 0.07291,-0.729356 0,-0.250567 -0.02469,-0.494103 -0.07291,-0.729357 -0.01177,-0.05885 -0.02589,-0.117654 -0.04,-0.175309",fill:"#FFF8ED",id:"path11",style:{fill:"#3a5dae",fillOpacity:1,strokeWidth:.544946}})]}),c=(0,l.jsxs)("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",version:"1.1",id:"svg11",children:[(0,l.jsx)("defs",{id:"defs11"}),(0,l.jsxs)("g",{id:"g1",transform:"translate(-4.0705219,-0.39392129)",children:[(0,l.jsx)("path",{style:{fill:"#000000"},d:"m 27.533723,47.116623 c -0.398999,-0.16055 -0.813378,-0.535079 -1.020287,-0.922168 L 26.31092,45.815584 26.28299,33.072287 c -0.02072,-9.452597 -7.36e-4,-12.869411 0.07737,-13.231676 0.139176,-0.645476 0.745093,-1.281268 1.371342,-1.43896 0.600341,-0.151167 15.808596,-0.151167 16.408937,0 0.629313,0.158463 1.234386,0.795084 1.368009,1.439337 0.0726,0.350044 0.09437,4.090529 0.077,13.231299 l -0.02422,12.743297 -0.225945,0.402688 c -0.124269,0.221478 -0.402282,0.526504 -0.617806,0.677835 l -0.391862,0.275147 -8.284426,0.0176 c -5.321254,0.0113 -8.364275,-0.01453 -8.50767,-0.07223 z M 18.142851,43.33001 C 17.67728,43.220087 17.129783,42.787323 16.895952,42.344411 l -0.210289,-0.398322 0.002,-9.136557 c 0.0019,-8.641995 0.01089,-9.156167 0.166569,-9.498844 0.206992,-0.45564 0.717779,-0.909762 1.162051,-1.033137 0.494741,-0.137391 4.560898,-0.124993 5.030558,0.01534 0.480159,0.143468 1.066349,0.729658 1.209816,1.209816 0.08477,0.2837 0.11068,2.503998 0.109166,9.354123 -0.0019,8.504062 -0.01077,9.001365 -0.167106,9.343636 -0.09082,0.198832 -0.302049,0.49472 -0.469404,0.65753 -0.504679,0.490971 -0.931342,0.5638 -3.241568,0.553322 -1.121833,-0.0051 -2.177028,-0.04168 -2.344879,-0.08131 z m 30.755351,-0.03352 c -0.549035,-0.177044 -0.916386,-0.490105 -1.168308,-0.995648 l -0.225335,-0.452187 v -8.986974 c 0,-6.849094 0.02644,-9.075467 0.11115,-9.358972 0.143468,-0.480158 0.729658,-1.066348 1.209817,-1.209816 0.472512,-0.141183 4.535954,-0.152688 5.034484,-0.01425 0.189923,0.05274 0.50274,0.238113 0.695149,0.411943 0.675894,0.61063 0.639223,-0.0049 0.611317,10.260976 l -0.02498,9.188201 -0.275148,0.391867 c -0.151331,0.215526 -0.456356,0.493542 -0.677835,0.617811 -0.39649,0.222468 -0.43746,0.226253 -2.662137,0.24595 -1.667614,0.01477 -2.356034,-0.01114 -2.628178,-0.0989 z",id:"path1"}),(0,l.jsx)("path",{d:"m 25.0459,14.829837 c -1.997501,0 -3.61621,1.619907 -3.61621,3.616264 0,1.996302 1.619853,3.61621 3.61621,3.61621 1.996302,0 3.61621,-1.618709 3.61621,-3.61621 0,-1.997555 -1.619908,-3.616264 -3.61621,-3.616264 z",fill:"#e5503c",id:"path10",style:{strokeWidth:.544946}}),(0,l.jsx)("path",{d:"m 21.315633,24.776362 c -0.118853,-0.462333 -0.327077,-0.889353 -0.604673,-1.259916 -0.659985,-0.882323 -1.712821,-1.452827 -2.898624,-1.452827 -1.997501,0 -3.61621,-1.618709 -3.61621,-3.61621 0,-1.997556 1.619853,-3.616264 3.61621,-3.616264 1.996302,0 3.61621,-1.618709 3.61621,-3.616188 0,-1.9975068 -1.618709,-3.6185665 -3.61621,-3.6185665 -1.997501,0 -3.61621,1.6187109 -3.61621,3.6162125 0,1.997489 -1.619908,3.616198 -3.616226,3.616198 -1.9963296,0 -3.6173926,1.619908 -3.6173926,3.617409 0,1.997501 1.6198859,3.61621 3.6162156,3.61621 1.996351,0 3.616204,1.619908 3.616204,3.61621 0,1.996356 -1.619853,3.61621 -3.616204,3.61621 -1.9963297,0 -3.6162156,1.621052 -3.6162156,3.618553 0,1.997555 1.6198859,3.616264 3.6162156,3.616264 1.996351,0 3.616204,-1.619907 3.616204,-3.616264 0,-1.996302 1.619908,-3.61621 3.61621,-3.61621 1.185803,0 2.238694,-0.570504 2.898624,-1.452827 0.27765,-0.371708 0.485874,-0.797584 0.604673,-1.259916 0.01531,-0.0576 0.02823,-0.116455 0.04,-0.175255 0.04823,-0.235308 0.07291,-0.47879 0.07291,-0.729356 0,-0.250567 -0.02469,-0.494103 -0.07291,-0.729357 -0.01177,-0.05885 -0.02589,-0.117654 -0.04,-0.175309",fill:"#FFF8ED",id:"path11",style:{fill:"#3a5dae",fillOpacity:1,strokeWidth:.544946}})]})]}),o=(0,l.jsxs)("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",version:"1.1",id:"svg11",children:[(0,l.jsx)("defs",{id:"defs11"}),(0,l.jsxs)("g",{id:"g13",transform:"matrix(1.1680027,0,0,1.1680027,-0.92436469,1.6314411)",children:[(0,l.jsx)("path",{id:"path13",style:{fill:"#000000",strokeWidth:.755879},d:"m 11.561555,16.860411 v 1.163346 1.161869 h 2.802069 2.803544 v -1.161869 -1.163346 h -2.803544 z m 6.075086,0 v 1.163346 1.161869 h 2.793211 2.794686 v -1.161869 -1.163346 h -2.794686 z m 6.075085,0 v 1.163346 1.161869 h 2.794688 2.79321 v -1.161869 -1.163346 h -2.79321 z m 6.05737,0 v 1.163346 1.161869 h 2.802069 2.803545 v -1.161869 -1.163346 h -2.803545 z m 6.075086,0 v 1.163346 1.161869 h 2.793211 2.794687 v -1.161869 -1.163346 h -2.794687 z m -20.805877,2.638197 v 1.153011 1.151535 h 2.793211 2.794687 v -1.151535 -1.153011 h -2.794687 z m 6.055894,0 v 1.153011 1.151535 h 0.900559 c 0.07778,-0.07672 0.150747,-0.143889 0.194875,-0.180111 0.645952,-0.530227 1.400887,-0.821033 2.196774,-0.845936 0.639837,-0.02002 1.252441,0.115695 1.838028,0.408943 0.162025,0.08114 0.321209,0.175784 0.476853,0.281978 v -0.816409 -1.153011 h -2.803544 z m 6.076561,0 v 1.153011 1.151535 h 2.793212 0.550669 c 0.193267,-0.167872 0.397114,-0.316443 0.608247,-0.445851 0.506205,-0.310262 1.016261,-0.490242 1.594433,-0.561004 0.01231,-0.0015 0.02564,-0.0031 0.03986,-0.0044 v -0.140251 -1.153011 h -2.79321 z m 6.075087,0 v 1.153011 0.12844 c 0.115103,0.0024 0.222823,0.0089 0.298218,0.01772 0.451411,0.053 0.821122,0.165189 1.244543,0.379416 0.330811,0.167369 0.574106,0.34238 0.865128,0.625962 h 0.385321 2.794688 v -1.151535 -1.153011 h -2.794688 z m 6.055893,0 v 1.153011 1.151535 h 2.803545 2.803545 v -1.151535 -1.153011 h -2.803545 z m -27.740185,2.617527 v 1.163346 l -0.0015,1.161869 h 2.782876 2.7814 l 0.01033,-0.04429 c 0.0058,-0.02418 0.01739,-0.546727 0.0251,-1.16187 l 0.01329,-1.119056 h -2.806495 z m 6.075086,0 v 1.172205 1.172203 h 2.793211 0.339554 c 0.013,-0.147944 0.03326,-0.291097 0.06348,-0.454709 0.126224,-0.683445 0.425197,-1.340448 0.850364,-1.871982 0.0045,-0.0056 0.0093,-0.01121 0.01476,-0.01772 h -1.268164 z m 9.824956,0 c 0.07423,0.078 0.146334,0.159037 0.215544,0.242118 0.225222,0.270369 0.486947,0.644801 0.639249,0.913846 0.102868,0.181716 0.303522,0.590978 0.395656,0.806075 0.07497,0.175018 0.100296,0.232217 0.110725,0.24507 v 0.0015 h 0.0015 0.0015 0.0015 0.0015 v -0.0015 l 0.0015,-0.0015 c 0.0012,-0.002 0.0027,-0.0049 0.0044,-0.0074 0.0068,-0.0093 0.04955,-0.106448 0.09596,-0.215543 0.0984,-0.231333 0.231537,-0.501613 0.364653,-0.745545 1.54e-4,-0.02825 -1.37e-4,-0.05688 0,-0.08563 l 0.0059,-1.151536 z m 2.307499,0 v 0.367606 c 0,0.03331 -3.07e-4,0.07662 0,0.125488 0.130993,-0.17438 0.270592,-0.339772 0.417801,-0.493094 z m 6.182858,0 c 0.08265,0.09631 0.149634,0.18815 0.230307,0.31003 0.377108,0.56971 0.579898,1.13242 0.690921,1.914796 0.0047,0.03304 0.0098,0.07292 0.01329,0.118106 l 0.701255,-0.0044 c 0.958977,-0.0072 2.215682,-0.01328 2.793211,-0.01329 h 1.051145 v -1.161896 -1.163346 h -2.79469 z M 20.234976,24.74695 v 1.175157 1.176632 h 0.882844 c -0.124905,-0.372869 -0.218815,-0.739944 -0.279026,-1.095434 -0.06244,-0.368446 -0.07906,-0.550148 -0.08563,-0.938944 -0.002,-0.115292 -0.0024,-0.219097 0,-0.315934 z m -6.055893,0.02657 v 1.16187 1.163345 h 2.793211 2.79321 V 25.93539 24.77352 h -2.79321 z m 22.720673,0 c 0.0053,0.304435 -0.0056,0.664113 -0.031,0.868081 -0.0602,0.483577 -0.170654,0.968181 -0.33365,1.457134 h 1.437943 V 25.93539 24.77352 Z m 1.542762,0 v 1.16187 1.163345 h 2.803545 2.803545 V 25.93539 24.77352 h -2.803545 z m -21.040613,2.946749 -2.7814,0.0059 c -1.530254,0.0034 -2.790167,0.01467 -2.799116,0.02362 -0.009,0.0089 -0.01992,0.529758 -0.02362,1.157441 l -0.0059,1.141201 h 2.805022 2.805021 v -1.164823 z m 0.469472,0.003 v 1.101339 c 0,0.605742 0.005,1.128407 0.01181,1.16187 l 0.01181,0.06053 0.813456,0.0059 c 0.447277,0.0029 1.69886,0.0078 2.7814,0.01034 l 1.204683,0.003 c -0.147282,-0.204067 -0.286959,-0.408424 -0.4178,-0.611199 -0.373745,-0.579224 -0.682665,-1.16057 -0.922705,-1.731732 h -0.689445 z m 18.418656,0.02067 c -0.0621,0.146797 -0.127776,0.293152 -0.199304,0.441422 -0.0032,0.198586 -0.0061,0.450902 -0.0074,0.721924 l -0.0059,1.141201 h 2.805022 2.805021 l -0.0059,-1.141201 c -0.0033,-0.627687 -0.01273,-1.148066 -0.02067,-1.155964 -0.01789,-0.01786 -4.406608,-0.02105 -5.370878,-0.0074 z m -0.680587,1.331648 c -0.02587,0.04346 -0.05158,0.08775 -0.07824,0.131393 -0.169875,0.278009 -0.357502,0.559066 -0.561004,0.841506 h 0.639249 z m -15.609206,1.282927 -2.368028,0.0044 c -1.302811,0.0032 -2.560985,0.0094 -2.794687,0.01329 l -0.423706,0.0074 v 1.150059 1.151535 l 1.63577,0.0044 c 0.899882,0.0028 2.156579,0.0077 2.793211,0.01033 l 1.15744,0.0044 v -1.173679 z m 18.207542,0 -2.368029,0.0044 c -0.380394,9.44e-4 -0.757499,0.0032 -1.105769,0.0044 -0.586242,0.770852 -1.290943,1.550613 -2.093432,2.317834 l 1.616578,0.0044 c 0.899882,0.0028 2.15658,0.0077 2.793211,0.01033 l 1.157441,0.0044 v -1.173679 z m 6.076562,0 -2.369505,0.0044 c -1.302811,0.0032 -2.559226,0.0094 -2.791735,0.01329 l -0.422229,0.0074 -0.01329,0.165348 c -0.0076,0.09114 -0.0079,0.609696 0,1.151536 l 0.01476,0.98471 1.632817,0.0044 c 0.89837,0.0028 2.155095,0.0077 2.791734,0.01033 l 1.157441,0.0044 v -1.173679 z m -23.814632,0.0015 v 1.172204 1.172203 h 2.803545 1.759782 c -0.385609,-0.370285 -0.786092,-0.774633 -1.07329,-1.089597 -0.381128,-0.417969 -0.730483,-0.837777 -1.046715,-1.254878 z m -3.459034,2.657388 v 1.153012 1.153012 h 2.794687 2.793211 v -1.153012 -1.153012 h -2.793211 z m 6.076562,0 v 1.153012 1.153012 h 2.793211 2.328168 c -0.07619,-0.05511 -0.151112,-0.110536 -0.219973,-0.16092 -0.886254,-0.648441 -1.71038,-1.316794 -2.469896,-2.003376 -0.05039,-0.04555 -0.102102,-0.0928 -0.155014,-0.141728 z m 9.198994,0 c -0.214775,0.197319 -0.435669,0.39427 -0.662871,0.589055 -0.699841,0.59999 -1.398707,1.151033 -2.179058,1.716969 h 2.502374 2.803545 v -1.153012 -1.153012 z m 2.933462,0 v 1.153012 1.153012 h 2.79321 2.793211 v -1.15308 -1.153012 H 38.012906 Z M 14.413819,35.63493 v 1.163346 1.16187 h 2.793211 2.79321 v -1.16187 -1.163346 h -2.79321 z m 6.055893,0 v 1.163346 1.16187 h 2.803545 2.803546 v -1.16187 -1.163346 h -2.803546 z m 6.075086,0 v 1.163346 1.16187 h 2.793211 2.794687 v -1.16187 -1.163346 h -2.794687 -0.336603 c -0.07701,0.05216 -0.13533,0.09026 -0.157967,0.101867 -0.02842,0.01457 -0.03031,0.01478 -0.0871,-0.02362 -0.02394,-0.01617 -0.06228,-0.04407 -0.110725,-0.07825 z m 6.076562,0 v 1.163346 1.16187 h 2.793211 2.793211 v -1.16187 -1.163346 h -2.793211 z m 6.055893,0 v 1.163346 1.16187 h 2.803546 2.803545 v -1.16187 -1.163346 h -2.803545 z"}),(0,l.jsx)("path",{d:"m 20.990146,12.712514 c -1.997501,0 -3.61621,1.619907 -3.61621,3.616264 0,1.996302 1.619853,3.61621 3.61621,3.61621 1.996302,0 3.61621,-1.618709 3.61621,-3.61621 0,-1.997555 -1.619908,-3.616264 -3.61621,-3.616264 z",fill:"#e5503c",id:"path10",style:{strokeWidth:.544946}}),(0,l.jsx)("path",{d:"m 17.259879,22.659039 c -0.118853,-0.462333 -0.327077,-0.889353 -0.604673,-1.259916 -0.659985,-0.882323 -1.712821,-1.452827 -2.898624,-1.452827 -1.997501,0 -3.61621,-1.618709 -3.61621,-3.61621 0,-1.997556 1.619853,-3.616264 3.61621,-3.616264 1.996302,0 3.61621,-1.618709 3.61621,-3.6161885 0,-1.9975065 -1.618709,-3.6185662 -3.61621,-3.6185662 -1.997501,0 -3.61621,1.6187109 -3.61621,3.616212 0,1.9974897 -1.6199079,3.6161987 -3.6162265,3.6161987 -1.9963294,0 -3.6173924,1.619908 -3.6173924,3.617409 0,1.997501 1.6198859,3.61621 3.6162154,3.61621 1.9963512,0 3.6162045,1.619908 3.6162045,3.61621 0,1.996356 -1.6198533,3.61621 -3.6162045,3.61621 -1.9963295,0 -3.6162154,1.621052 -3.6162154,3.618553 0,1.997555 1.6198859,3.616264 3.6162154,3.616264 1.9963512,0 3.6162045,-1.619907 3.6162045,-3.616264 0,-1.996302 1.619908,-3.61621 3.61621,-3.61621 1.185803,0 2.238694,-0.570504 2.898624,-1.452827 0.27765,-0.371708 0.485874,-0.797584 0.604673,-1.259916 0.01531,-0.0576 0.02823,-0.116455 0.04,-0.175255 0.04823,-0.235308 0.07291,-0.47879 0.07291,-0.729356 0,-0.250567 -0.02469,-0.494103 -0.07291,-0.729357 -0.01177,-0.05885 -0.02589,-0.117654 -0.04,-0.175309",fill:"#FFF8ED",id:"path11",style:{fill:"#3a5dae",fillOpacity:1,strokeWidth:.544946}})]})]});(0,e.registerBlockType)("share-one/wall-of-love",{title:"Share.one - Wall of Love",icon:o,category:"widgets",edit(){const{serverUrl:e,uuid:i}=shareOneData,r=(0,t.useRef)(null),n=(0,t.useMemo)((()=>`shareone-carousel-${Math.random().toString(36).slice(2,10)}`),[]);return(0,t.useEffect)((()=>{if(!i||!e)return;const t=r.current;if(!t)return;const s=t.ownerDocument;t.id=n;const l=`${n}-loader`;t.querySelector(`#${CSS.escape(l)}`)?.remove();const c=s.createElement("script");return c.id=l,c.src=`${e}/walloflove/${i}.js?div_id=${encodeURIComponent(n)}&ts=${Date.now()}`,c.async=!1,t.appendChild(c),()=>{t.querySelector(`#${CSS.escape(l)}`)?.remove()}}),[i,e,n]),(0,l.jsx)("div",{...(0,s.useBlockProps)(),children:i?(0,l.jsx)("div",{ref:r}):(0,l.jsx)("p",{children:(0,l.jsx)("em",{children:"No UUID defined in Share.one settings."})})})},save:()=>(0,l.jsx)("div",{...s.useBlockProps.save(),children:(0,l.jsx)("p",{children:"[share_one_wall_of_love]"})})}),(0,e.registerBlockType)("share-one/catch-widget",{title:"Share.one - Inline Catch widget",icon:n,category:"widgets",edit(){const{serverUrl:e,uuid:i}=shareOneData,r=(0,t.useRef)(null),n=(0,t.useMemo)((()=>`shareone-carousel-${Math.random().toString(36).slice(2,10)}`),[]);return(0,t.useEffect)((()=>{if(!i||!e)return;const t=r.current;if(!t)return;const s=t.ownerDocument;t.id=n;const l=`${n}-loader`;t.querySelector(`#${CSS.escape(l)}`)?.remove();const c=s.createElement("script");return c.id=l,c.src=`${e}/inline-widget/${i}.js?div_id=${encodeURIComponent(n)}&ts=${Date.now()}`,c.async=!1,t.appendChild(c),()=>{t.querySelector(`#${CSS.escape(l)}`)?.remove()}}),[i,e,n]),(0,l.jsx)("div",{...(0,s.useBlockProps)(),children:i?(0,l.jsx)("div",{ref:r}):(0,l.jsx)("p",{children:(0,l.jsx)("em",{children:"No UUID defined in Share.one settings."})})})},save:()=>(0,l.jsx)("div",{...s.useBlockProps.save(),children:(0,l.jsx)("p",{children:"[share_one_catch_widget]"})})}),(0,e.registerBlockType)("share-one/carousel-widget",{title:"Share.one - Carousel Catch widget",icon:c,category:"widgets",attributes:{displayMode:{type:"string",default:"fullwidth"}},edit({attributes:e,setAttributes:n}){const{displayMode:c}=e,{serverUrl:o,uuid:h}=shareOneData,d=(0,t.useRef)(null),a=(0,t.useMemo)((()=>`shareone-carousel-${Math.random().toString(36).slice(2,10)}`),[]);return(0,t.useEffect)((()=>{if(!h||!o)return;const e=d.current;if(!e)return;const t=e.ownerDocument;e.id=a;const s=`${a}-loader`;e.querySelector(`#${CSS.escape(s)}`)?.remove();const i=t.createElement("script");i.id=s;let r=`${o}/carousel-widget/${h}.js?div_id=${encodeURIComponent(a)}&ts=${Date.now()}`;return"container"===c&&(r+="&display_mode=container"),i.src=r,i.async=!1,e.appendChild(i),()=>{e.querySelector(`#${CSS.escape(s)}`)?.remove()}}),[h,o,a,c]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.InspectorControls,{children:(0,l.jsx)(i.PanelBody,{title:(0,r.__)("Carousel Settings","share-one"),children:(0,l.jsx)(i.ToggleControl,{label:(0,r.__)("Container Mode","share-one"),help:(0,r.__)("Enable to fit the carousel inside the container width instead of full viewport width","share-one"),checked:"container"===c,onChange:e=>n({displayMode:e?"container":"viewport"})})})}),(0,l.jsx)("div",{...(0,s.useBlockProps)(),children:h?(0,l.jsx)("div",{ref:d}):(0,l.jsx)("p",{children:(0,l.jsx)("em",{children:"No UUID defined in Share.one settings."})})})]})},save({attributes:e}){const{displayMode:t}=e,i="container"===t?'[share_one_carousel_widget display_mode="container"]':"[share_one_carousel_widget]";return(0,l.jsx)("div",{...s.useBlockProps.save(),children:(0,l.jsx)("p",{children:i})})}})})(); -
share-one/trunk/package-lock.json
r3255883 r3448134 1 1 { 2 "name": "s rc",3 "version": "1. 0.0",2 "name": "share-one", 3 "version": "1.1.0", 4 4 "lockfileVersion": 3, 5 5 "requires": true, 6 6 "packages": { 7 7 "": { 8 "name": "s rc",9 "version": "1. 0.0",10 "license": " ISC",8 "name": "share-one", 9 "version": "1.1.0", 10 "license": "GPL3", 11 11 "dependencies": { 12 12 "@wordpress/blocks": "^13.6.0", … … 7974 7974 }, 7975 7975 "node_modules/caniuse-lite": { 7976 "version": "1.0.30001 653",7977 "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001 653.tgz",7978 "integrity": "sha512- XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw==",7976 "version": "1.0.30001766", 7977 "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001766.tgz", 7978 "integrity": "sha512-4C0lfJ0/YPjJQHagaE9x2Elb69CIqEPZeG0anQt9SIvIoOH4a4uaRl73IavyO+0qZh6MDLH//DrXThEYKHkmYA==", 7979 7979 "funding": [ 7980 7980 { -
share-one/trunk/readme.txt
r3351066 r3448134 2 2 Contributors: davefx 3 3 Requires at least: 6.0 4 Tested up to: 6. 6.15 Stable tag: 1. 1.14 Tested up to: 6.9 5 Stable tag: 1.2.0 6 6 Requires PHP: 8.0 7 7 License: GPLv3 or later … … 21 21 22 22 == Changelog == 23 24 = 1.2.0 = 25 26 * New: Adding support to new Share.One CATCH Carousel Widget 27 * Fix: Fixed several issues in the Elementor support 28 * Fix: Fixed several issues in the blocks preview inside the Gutenberg editor 23 29 24 30 = 1.1.1 = -
share-one/trunk/share-one.php
r3351066 r3448134 3 3 Plugin Name: Share.one 4 4 Description: Show professional video testimonials by Share.one in an easy way 5 Version: 1. 1.15 Version: 1.2.0 6 6 Author: Share.one 7 7 Author URI: https://www.share.one/ … … 13 13 } 14 14 15 const SHARE_ONE_PLUGIN_VERSION = '1. 1.1';15 const SHARE_ONE_PLUGIN_VERSION = '1.2.0'; 16 16 17 17 // Define the option name for the UUID and script toggle … … 97 97 <label>Inline catch widget</label> 98 98 <p> 99 After saving your settings, you can use the following shortcode to render an inline catchwidget in the contents of99 After saving your settings, you can use the following shortcode to render an inline CATCH widget in the contents of 100 100 any page or post in your website: 101 101 </p> … … 106 106 </p> 107 107 </div> 108 109 <div class="share-one-setting"> 110 <label>Inline catch widget</label> 111 <p> 112 After saving your settings, you can use the following shortcode to render a CATCH Carousel widget in the contents of 113 any page or post in your website: 114 </p> 115 <code>[share_one_carousel_widget]</code> 116 <p> 117 You can also use the Share.one Carousel CATCH Gutenberg block to add the it to your 118 pages and posts. 119 </p> 120 </div> 121 108 122 109 123 <div class="share-one-setting"> … … 146 160 147 161 // Shortcode to render the Wall of Love JS snippet 148 function share_one_render_wall_of_love_shortcode( ) {162 function share_one_render_wall_of_love_shortcode( $atts = [] ) { 149 163 $uuid = esc_attr( get_option( SHARE_ONE_OPTION_UUID ) ); 150 164 $catch_server = esc_attr( get_option( SHARE_ONE_OPTION_CATCH_SERVER ) ); 151 165 152 $div_id = uniqid('share-one-wall-of-love-', true); 166 // Parse attributes 167 $atts = shortcode_atts( array( 168 'div_id' => uniqid('share-one-wall-of-love-', true), 169 ), $atts ); 170 171 $div_id = esc_attr( $atts['div_id'] ); 153 172 154 173 if ( $uuid ) { 155 174 wp_enqueue_script( $div_id, $catch_server . '/walloflove/' . $uuid . '.js?div_id=' . $div_id, array(), SHARE_ONE_PLUGIN_VERSION, array( 'strategy' => 'defer' ) ); 156 return "<div id='" . $div_id . "' ></div>";175 return "<div id='" . $div_id . "' class='share-one-wall-of-love'></div>"; 157 176 } 158 177 … … 162 181 add_shortcode( 'share_one_wall_of_love', 'share_one_render_wall_of_love_shortcode' ); 163 182 164 // Shortcode to render the Wall of Love JS snippet165 function share_one_render_catch_widget_shortcode( ) {183 // Shortcode to render the Inline JS snippet 184 function share_one_render_catch_widget_shortcode( $atts = [] ) { 166 185 $uuid = esc_attr( get_option( SHARE_ONE_OPTION_UUID ) ); 167 186 $catch_server = esc_attr( get_option( SHARE_ONE_OPTION_CATCH_SERVER ) ); 168 187 169 $div_id = uniqid('share-one-inline-catch-', true); 188 // Parse attributes 189 $atts = shortcode_atts( array( 190 'div_id' => uniqid('share-one-inline-catch-', true), 191 ), $atts ); 192 193 $div_id = esc_attr( $atts['div_id'] ); 170 194 171 195 if ( $uuid ) { 172 196 wp_enqueue_script( $div_id, $catch_server . '/inline-widget/' . $uuid . '.js?div_id=' . $div_id, array(), SHARE_ONE_PLUGIN_VERSION, array( 'strategy' => 'defer' ) ); 173 return "<div id='" . $div_id . "' ></div>";197 return "<div id='" . $div_id . "' class='share-one-inline-catch'></div>"; 174 198 } 175 199 … … 178 202 179 203 add_shortcode( 'share_one_catch_widget', 'share_one_render_catch_widget_shortcode' ); 204 205 206 // Shortcode to render the Carousel JS snippet 207 function share_one_render_carousel_widget_shortcode( $atts = [] ) { 208 $uuid = esc_attr( get_option( SHARE_ONE_OPTION_UUID ) ); 209 $catch_server = esc_attr( get_option( SHARE_ONE_OPTION_CATCH_SERVER ) ); 210 211 // Parse attributes 212 $atts = shortcode_atts( array( 213 'div_id' => uniqid('share-one-carousel-catch-', true), 214 'display_mode' => 'viewport', // 'viewport' or 'container' 215 ), $atts ); 216 217 $div_id = esc_attr( $atts['div_id'] ); 218 $display_mode = esc_attr( $atts['display_mode'] ); 219 220 if ( $uuid ) { 221 $script_url = $catch_server . '/carousel-widget/' . $uuid . '.js?div_id=' . $div_id; 222 223 // Add display_mode parameter if set to container 224 if ( $display_mode === 'container' ) { 225 $script_url .= '&display_mode=container'; 226 } 227 228 wp_enqueue_script( $div_id, $script_url, array(), SHARE_ONE_PLUGIN_VERSION, array( 'strategy' => 'defer' ) ); 229 return "<div id='" . $div_id . "' class='share-one-carousel-catch'></div>"; 230 } 231 232 return ''; 233 } 234 235 add_shortcode( 'share_one_carousel_widget', 'share_one_render_carousel_widget_shortcode' ); 180 236 181 237 … … 211 267 ) ); 212 268 269 register_block_type( 'share-one/carousel-widget', array( 270 'editor_script' => 'share-one-blocks', 271 ) ); 272 213 273 } 214 274 add_action( 'init', 'share_one_register_gutenberg_blocks' ); 215 275 216 function share_one_register_elementor_widget() { 217 \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Share_One_Inline_Catch_Widget() ); 218 \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Share_One_Wall_of_Love_Widget() ); 219 } 220 221 // If Elementor class exists 222 if ( class_exists( '\Elementor\Widget_Base' ) ) { 223 // Include the Elementor widget file 224 include_once plugin_dir_path( __FILE__ ) . 'inline-catch-elementor-widget.php'; 225 226 // Include the Elementor widget file 227 include_once plugin_dir_path( __FILE__ ) . 'wall-of-love-elementor-widget.php'; 228 229 add_action( 'elementor/widgets/widgets_registered', 'share_one_register_elementor_widget' ); 230 } 231 232 276 function share_one_register_elementor_widget( $widgets_manager ) { 277 // Include the Elementor widget files 278 include_once plugin_dir_path( __FILE__ ) . 'elementor-widgets/inline-catch-elementor-widget.php'; 279 include_once plugin_dir_path( __FILE__ ) . 'elementor-widgets/wall-of-love-elementor-widget.php'; 280 include_once plugin_dir_path( __FILE__ ) . 'elementor-widgets/carousel-catch-elementor-widget.php'; 281 282 // Register widgets 283 if ( class_exists( 'Share_One_Inline_Catch_Widget' ) ) { 284 $widgets_manager->register( new \Share_One_Inline_Catch_Widget() ); 285 } 286 287 if ( class_exists( 'Share_One_Wall_of_Love_Widget' ) ) { 288 $widgets_manager->register( new \Share_One_Wall_of_Love_Widget() ); 289 } 290 291 if ( class_exists( 'Share_One_Carousel_Catch_Widget' ) ) { 292 $widgets_manager->register( new \Share_One_Carousel_Catch_Widget() ); 293 } 294 } 295 296 // Hook into Elementor's initialization 297 add_action( 'elementor/widgets/register', 'share_one_register_elementor_widget' ); 298 299 // Register and enqueue custom icon set for Elementor 300 add_action( 'elementor/editor/before_enqueue_scripts', 'share_one_enqueue_elementor_icons' ); 301 add_action( 'elementor/frontend/after_enqueue_styles', 'share_one_enqueue_elementor_icons' ); 302 303 function share_one_enqueue_elementor_icons() { 304 wp_enqueue_style( 305 'share-one-elementor-icons', 306 plugins_url( 'assets/elementor-share-one-icons.css', __FILE__ ), 307 [], 308 SHARE_ONE_PLUGIN_VERSION 309 ); 310 } 311 312 // Register custom icon set for Elementor 313 add_action( 'elementor/icons_manager/additional_tabs', function( $tabs ) { 314 $tabs['share-one'] = [ 315 'name' => 'share-one', 316 'label' => 'Share.one', 317 'prefix' => 'share-one-', 318 'displayPrefix' => 'share-one', 319 'url' => plugins_url( 'assets/elementor-share-one-icons.css', __FILE__ ), 320 'icons' => [ 'carousel', 'video', 'wol' ], 321 'ver' => SHARE_ONE_PLUGIN_VERSION, 322 'native' => false, 323 ]; 324 return $tabs; 325 }); 326 327 328 -
share-one/trunk/src/index.js
r3255883 r3448134 1 1 import { registerBlockType } from '@wordpress/blocks'; 2 import { useBlockProps } from '@wordpress/block-editor'; 2 import {useEffect, useRef, useMemo} from '@wordpress/element'; 3 import { useBlockProps, InspectorControls } from '@wordpress/block-editor'; 4 import { PanelBody, ToggleControl } from '@wordpress/components'; 5 import { __ } from '@wordpress/i18n'; 6 7 const inlineIcon = ( 8 <svg width="54" height="54" viewBox="0 0 54 54" fill="none" version="1.1" id="svg11"> 9 <defs id="defs11" /> 10 <path style={{fill:"#000000"}} 11 d="M 11.322377,31.65268 V 14.784429 H 31.207812 51.093247 V 31.65268 48.520932 H 31.207812 11.322377 Z m 7.1294,12.010475 v -2.248323 h -2.061934 -2.061934 v 2.248323 2.248324 h 2.061934 2.061934 z m 29.635939,0 v -2.248323 h -2.061934 -2.061935 v 2.248323 2.248324 h 2.061935 2.061934 z M 18.44607,37.646268 18.44017,35.415419 H 16.389885 14.3396 l -0.0059,2.230849 -0.0059,2.23085 h 2.062168 2.062169 z m 29.635938,0 -0.0059,-2.230849 h -2.050285 -2.050286 l -0.0059,2.230849 -0.0059,2.23085 h 2.062169 2.062168 z m -21.518432,1.011517 c 0.209317,-0.11962 0.516873,-0.296383 0.683458,-0.392808 0.287389,-0.166349 0.656997,-0.379025 3.04048,-1.749519 0.557421,-0.320516 1.406659,-0.810254 1.887194,-1.088308 0.480536,-0.278054 1.230171,-0.71055 1.665857,-0.961103 0.435685,-0.250552 0.959906,-0.552456 1.164934,-0.670898 0.205029,-0.118441 0.503835,-0.290818 0.664013,-0.383059 0.160179,-0.09224 0.825939,-0.47681 1.479467,-0.854598 0.653529,-0.377788 1.350742,-0.779533 1.549363,-0.892767 0.198622,-0.113233 0.375003,-0.218451 0.391959,-0.233818 0.03707,-0.0336 0.04554,-0.02841 -1.824828,-1.116724 -0.743229,-0.432462 -1.508591,-0.878194 -1.700805,-0.990514 -0.337597,-0.197275 -0.717641,-0.417148 -2.003688,-1.159227 -0.333171,-0.192247 -0.946509,-0.546738 -1.362973,-0.787757 -0.416464,-0.241019 -1.061256,-0.61282 -1.43287,-0.826225 -0.371614,-0.213405 -0.953499,-0.548631 -1.293077,-0.744947 -0.339579,-0.196317 -0.790409,-0.456766 -1.001844,-0.578778 -0.451859,-0.26075 -1.174781,-0.679003 -1.832654,-1.060298 -0.258323,-0.149721 -0.475875,-0.27222 -0.483447,-0.27222 -0.01899,0 -0.01745,13.329321 0.0016,14.243349 0.0085,0.40574 0.01807,0.737708 0.02133,0.737708 0.0033,0 0.177174,-0.09787 0.38649,-0.217489 z M 18.451777,31.65268 v -2.236674 h -2.061934 -2.061934 v 2.236674 2.236675 h 2.061934 2.061934 z m 29.635939,0 v -2.236674 h -2.061934 -2.061935 v 2.236674 2.236675 h 2.061935 2.061934 z m -29.641646,-5.993588 0.0059,-2.230849 h -2.06201 -2.062051 v 2.221142 c 0,1.221628 0.007,2.228188 0.01566,2.2368 0.0086,0.0086 0.933861,0.01298 2.056109,0.0097 l 2.040451,-0.006 z m 29.635938,0 0.0059,-2.230849 h -2.062051 -2.062052 v 2.221142 c 0,1.221628 0.007,2.228188 0.01566,2.2368 0.0086,0.0086 0.933862,0.01298 2.05611,0.0097 l 2.040451,-0.006 z M 18.451777,19.642206 v -2.248324 h -2.061934 -2.061934 v 2.248324 2.248323 h 2.061934 2.061934 z m 29.635939,0 v -2.248324 h -2.061934 -2.061935 v 2.248324 2.248323 h 2.061935 2.061934 z" 12 id="path1" /> 13 <path d="m 20.990146,12.712514 c -1.997501,0 -3.61621,1.619907 -3.61621,3.616264 0,1.996302 1.619853,3.61621 3.61621,3.61621 1.996302,0 3.61621,-1.618709 3.61621,-3.61621 0,-1.997555 -1.619908,-3.616264 -3.61621,-3.616264 z" 14 fill="#e5503c" id="path10" style={{strokeWidth:0.544946}} /> 15 <path d="m 17.259879,22.659039 c -0.118853,-0.462333 -0.327077,-0.889353 -0.604673,-1.259916 -0.659985,-0.882323 -1.712821,-1.452827 -2.898624,-1.452827 -1.997501,0 -3.61621,-1.618709 -3.61621,-3.61621 0,-1.997556 1.619853,-3.616264 3.61621,-3.616264 1.996302,0 3.61621,-1.618709 3.61621,-3.6161885 0,-1.9975065 -1.618709,-3.6185662 -3.61621,-3.6185662 -1.997501,0 -3.61621,1.6187109 -3.61621,3.616212 0,1.9974897 -1.6199079,3.6161987 -3.6162265,3.6161987 -1.9963294,0 -3.6173924,1.619908 -3.6173924,3.617409 0,1.997501 1.6198859,3.61621 3.6162154,3.61621 1.9963512,0 3.6162045,1.619908 3.6162045,3.61621 0,1.996356 -1.6198533,3.61621 -3.6162045,3.61621 -1.9963295,0 -3.6162154,1.621052 -3.6162154,3.618553 0,1.997555 1.6198859,3.616264 3.6162154,3.616264 1.9963512,0 3.6162045,-1.619907 3.6162045,-3.616264 0,-1.996302 1.619908,-3.61621 3.61621,-3.61621 1.185803,0 2.238694,-0.570504 2.898624,-1.452827 0.27765,-0.371708 0.485874,-0.797584 0.604673,-1.259916 0.01531,-0.0576 0.02823,-0.116455 0.04,-0.175255 0.04823,-0.235308 0.07291,-0.47879 0.07291,-0.729356 0,-0.250567 -0.02469,-0.494103 -0.07291,-0.729357 -0.01177,-0.05885 -0.02589,-0.117654 -0.04,-0.175309" 16 fill="#FFF8ED" id="path11" style={{fill:"#3a5dae",fillOpacity:1,strokeWidth:0.544946}} /> 17 </svg> 18 ); 19 20 const carouselIcon = ( 21 <svg width="54" height="54" viewBox="0 0 54 54" fill="none" version="1.1" id="svg11"> 22 <defs id="defs11" /> 23 <g id="g1" transform="translate(-4.0705219,-0.39392129)"> 24 <path style={{fill:"#000000"}} d="m 27.533723,47.116623 c -0.398999,-0.16055 -0.813378,-0.535079 -1.020287,-0.922168 L 26.31092,45.815584 26.28299,33.072287 c -0.02072,-9.452597 -7.36e-4,-12.869411 0.07737,-13.231676 0.139176,-0.645476 0.745093,-1.281268 1.371342,-1.43896 0.600341,-0.151167 15.808596,-0.151167 16.408937,0 0.629313,0.158463 1.234386,0.795084 1.368009,1.439337 0.0726,0.350044 0.09437,4.090529 0.077,13.231299 l -0.02422,12.743297 -0.225945,0.402688 c -0.124269,0.221478 -0.402282,0.526504 -0.617806,0.677835 l -0.391862,0.275147 -8.284426,0.0176 c -5.321254,0.0113 -8.364275,-0.01453 -8.50767,-0.07223 z M 18.142851,43.33001 C 17.67728,43.220087 17.129783,42.787323 16.895952,42.344411 l -0.210289,-0.398322 0.002,-9.136557 c 0.0019,-8.641995 0.01089,-9.156167 0.166569,-9.498844 0.206992,-0.45564 0.717779,-0.909762 1.162051,-1.033137 0.494741,-0.137391 4.560898,-0.124993 5.030558,0.01534 0.480159,0.143468 1.066349,0.729658 1.209816,1.209816 0.08477,0.2837 0.11068,2.503998 0.109166,9.354123 -0.0019,8.504062 -0.01077,9.001365 -0.167106,9.343636 -0.09082,0.198832 -0.302049,0.49472 -0.469404,0.65753 -0.504679,0.490971 -0.931342,0.5638 -3.241568,0.553322 -1.121833,-0.0051 -2.177028,-0.04168 -2.344879,-0.08131 z m 30.755351,-0.03352 c -0.549035,-0.177044 -0.916386,-0.490105 -1.168308,-0.995648 l -0.225335,-0.452187 v -8.986974 c 0,-6.849094 0.02644,-9.075467 0.11115,-9.358972 0.143468,-0.480158 0.729658,-1.066348 1.209817,-1.209816 0.472512,-0.141183 4.535954,-0.152688 5.034484,-0.01425 0.189923,0.05274 0.50274,0.238113 0.695149,0.411943 0.675894,0.61063 0.639223,-0.0049 0.611317,10.260976 l -0.02498,9.188201 -0.275148,0.391867 c -0.151331,0.215526 -0.456356,0.493542 -0.677835,0.617811 -0.39649,0.222468 -0.43746,0.226253 -2.662137,0.24595 -1.667614,0.01477 -2.356034,-0.01114 -2.628178,-0.0989 z" 25 id="path1" /> 26 <path d="m 25.0459,14.829837 c -1.997501,0 -3.61621,1.619907 -3.61621,3.616264 0,1.996302 1.619853,3.61621 3.61621,3.61621 1.996302,0 3.61621,-1.618709 3.61621,-3.61621 0,-1.997555 -1.619908,-3.616264 -3.61621,-3.616264 z" 27 fill="#e5503c" id="path10" style={{strokeWidth:0.544946}} /> 28 <path d="m 21.315633,24.776362 c -0.118853,-0.462333 -0.327077,-0.889353 -0.604673,-1.259916 -0.659985,-0.882323 -1.712821,-1.452827 -2.898624,-1.452827 -1.997501,0 -3.61621,-1.618709 -3.61621,-3.61621 0,-1.997556 1.619853,-3.616264 3.61621,-3.616264 1.996302,0 3.61621,-1.618709 3.61621,-3.616188 0,-1.9975068 -1.618709,-3.6185665 -3.61621,-3.6185665 -1.997501,0 -3.61621,1.6187109 -3.61621,3.6162125 0,1.997489 -1.619908,3.616198 -3.616226,3.616198 -1.9963296,0 -3.6173926,1.619908 -3.6173926,3.617409 0,1.997501 1.6198859,3.61621 3.6162156,3.61621 1.996351,0 3.616204,1.619908 3.616204,3.61621 0,1.996356 -1.619853,3.61621 -3.616204,3.61621 -1.9963297,0 -3.6162156,1.621052 -3.6162156,3.618553 0,1.997555 1.6198859,3.616264 3.6162156,3.616264 1.996351,0 3.616204,-1.619907 3.616204,-3.616264 0,-1.996302 1.619908,-3.61621 3.61621,-3.61621 1.185803,0 2.238694,-0.570504 2.898624,-1.452827 0.27765,-0.371708 0.485874,-0.797584 0.604673,-1.259916 0.01531,-0.0576 0.02823,-0.116455 0.04,-0.175255 0.04823,-0.235308 0.07291,-0.47879 0.07291,-0.729356 0,-0.250567 -0.02469,-0.494103 -0.07291,-0.729357 -0.01177,-0.05885 -0.02589,-0.117654 -0.04,-0.175309" 29 fill="#FFF8ED" id="path11" style={{fill:"#3a5dae",fillOpacity:1,strokeWidth:0.544946}} /> 30 </g> 31 </svg> 32 ); 33 34 const wolIcon = ( 35 36 <svg width="54" height="54" viewBox="0 0 54 54" fill="none" version="1.1" id="svg11"> 37 <defs id="defs11" /> 38 <g id="g13" transform="matrix(1.1680027,0,0,1.1680027,-0.92436469,1.6314411)"> 39 <path id="path13" style={{fill:"#000000",strokeWidth:0.755879}} 40 d="m 11.561555,16.860411 v 1.163346 1.161869 h 2.802069 2.803544 v -1.161869 -1.163346 h -2.803544 z m 6.075086,0 v 1.163346 1.161869 h 2.793211 2.794686 v -1.161869 -1.163346 h -2.794686 z m 6.075085,0 v 1.163346 1.161869 h 2.794688 2.79321 v -1.161869 -1.163346 h -2.79321 z m 6.05737,0 v 1.163346 1.161869 h 2.802069 2.803545 v -1.161869 -1.163346 h -2.803545 z m 6.075086,0 v 1.163346 1.161869 h 2.793211 2.794687 v -1.161869 -1.163346 h -2.794687 z m -20.805877,2.638197 v 1.153011 1.151535 h 2.793211 2.794687 v -1.151535 -1.153011 h -2.794687 z m 6.055894,0 v 1.153011 1.151535 h 0.900559 c 0.07778,-0.07672 0.150747,-0.143889 0.194875,-0.180111 0.645952,-0.530227 1.400887,-0.821033 2.196774,-0.845936 0.639837,-0.02002 1.252441,0.115695 1.838028,0.408943 0.162025,0.08114 0.321209,0.175784 0.476853,0.281978 v -0.816409 -1.153011 h -2.803544 z m 6.076561,0 v 1.153011 1.151535 h 2.793212 0.550669 c 0.193267,-0.167872 0.397114,-0.316443 0.608247,-0.445851 0.506205,-0.310262 1.016261,-0.490242 1.594433,-0.561004 0.01231,-0.0015 0.02564,-0.0031 0.03986,-0.0044 v -0.140251 -1.153011 h -2.79321 z m 6.075087,0 v 1.153011 0.12844 c 0.115103,0.0024 0.222823,0.0089 0.298218,0.01772 0.451411,0.053 0.821122,0.165189 1.244543,0.379416 0.330811,0.167369 0.574106,0.34238 0.865128,0.625962 h 0.385321 2.794688 v -1.151535 -1.153011 h -2.794688 z m 6.055893,0 v 1.153011 1.151535 h 2.803545 2.803545 v -1.151535 -1.153011 h -2.803545 z m -27.740185,2.617527 v 1.163346 l -0.0015,1.161869 h 2.782876 2.7814 l 0.01033,-0.04429 c 0.0058,-0.02418 0.01739,-0.546727 0.0251,-1.16187 l 0.01329,-1.119056 h -2.806495 z m 6.075086,0 v 1.172205 1.172203 h 2.793211 0.339554 c 0.013,-0.147944 0.03326,-0.291097 0.06348,-0.454709 0.126224,-0.683445 0.425197,-1.340448 0.850364,-1.871982 0.0045,-0.0056 0.0093,-0.01121 0.01476,-0.01772 h -1.268164 z m 9.824956,0 c 0.07423,0.078 0.146334,0.159037 0.215544,0.242118 0.225222,0.270369 0.486947,0.644801 0.639249,0.913846 0.102868,0.181716 0.303522,0.590978 0.395656,0.806075 0.07497,0.175018 0.100296,0.232217 0.110725,0.24507 v 0.0015 h 0.0015 0.0015 0.0015 0.0015 v -0.0015 l 0.0015,-0.0015 c 0.0012,-0.002 0.0027,-0.0049 0.0044,-0.0074 0.0068,-0.0093 0.04955,-0.106448 0.09596,-0.215543 0.0984,-0.231333 0.231537,-0.501613 0.364653,-0.745545 1.54e-4,-0.02825 -1.37e-4,-0.05688 0,-0.08563 l 0.0059,-1.151536 z m 2.307499,0 v 0.367606 c 0,0.03331 -3.07e-4,0.07662 0,0.125488 0.130993,-0.17438 0.270592,-0.339772 0.417801,-0.493094 z m 6.182858,0 c 0.08265,0.09631 0.149634,0.18815 0.230307,0.31003 0.377108,0.56971 0.579898,1.13242 0.690921,1.914796 0.0047,0.03304 0.0098,0.07292 0.01329,0.118106 l 0.701255,-0.0044 c 0.958977,-0.0072 2.215682,-0.01328 2.793211,-0.01329 h 1.051145 v -1.161896 -1.163346 h -2.79469 z M 20.234976,24.74695 v 1.175157 1.176632 h 0.882844 c -0.124905,-0.372869 -0.218815,-0.739944 -0.279026,-1.095434 -0.06244,-0.368446 -0.07906,-0.550148 -0.08563,-0.938944 -0.002,-0.115292 -0.0024,-0.219097 0,-0.315934 z m -6.055893,0.02657 v 1.16187 1.163345 h 2.793211 2.79321 V 25.93539 24.77352 h -2.79321 z m 22.720673,0 c 0.0053,0.304435 -0.0056,0.664113 -0.031,0.868081 -0.0602,0.483577 -0.170654,0.968181 -0.33365,1.457134 h 1.437943 V 25.93539 24.77352 Z m 1.542762,0 v 1.16187 1.163345 h 2.803545 2.803545 V 25.93539 24.77352 h -2.803545 z m -21.040613,2.946749 -2.7814,0.0059 c -1.530254,0.0034 -2.790167,0.01467 -2.799116,0.02362 -0.009,0.0089 -0.01992,0.529758 -0.02362,1.157441 l -0.0059,1.141201 h 2.805022 2.805021 v -1.164823 z m 0.469472,0.003 v 1.101339 c 0,0.605742 0.005,1.128407 0.01181,1.16187 l 0.01181,0.06053 0.813456,0.0059 c 0.447277,0.0029 1.69886,0.0078 2.7814,0.01034 l 1.204683,0.003 c -0.147282,-0.204067 -0.286959,-0.408424 -0.4178,-0.611199 -0.373745,-0.579224 -0.682665,-1.16057 -0.922705,-1.731732 h -0.689445 z m 18.418656,0.02067 c -0.0621,0.146797 -0.127776,0.293152 -0.199304,0.441422 -0.0032,0.198586 -0.0061,0.450902 -0.0074,0.721924 l -0.0059,1.141201 h 2.805022 2.805021 l -0.0059,-1.141201 c -0.0033,-0.627687 -0.01273,-1.148066 -0.02067,-1.155964 -0.01789,-0.01786 -4.406608,-0.02105 -5.370878,-0.0074 z m -0.680587,1.331648 c -0.02587,0.04346 -0.05158,0.08775 -0.07824,0.131393 -0.169875,0.278009 -0.357502,0.559066 -0.561004,0.841506 h 0.639249 z m -15.609206,1.282927 -2.368028,0.0044 c -1.302811,0.0032 -2.560985,0.0094 -2.794687,0.01329 l -0.423706,0.0074 v 1.150059 1.151535 l 1.63577,0.0044 c 0.899882,0.0028 2.156579,0.0077 2.793211,0.01033 l 1.15744,0.0044 v -1.173679 z m 18.207542,0 -2.368029,0.0044 c -0.380394,9.44e-4 -0.757499,0.0032 -1.105769,0.0044 -0.586242,0.770852 -1.290943,1.550613 -2.093432,2.317834 l 1.616578,0.0044 c 0.899882,0.0028 2.15658,0.0077 2.793211,0.01033 l 1.157441,0.0044 v -1.173679 z m 6.076562,0 -2.369505,0.0044 c -1.302811,0.0032 -2.559226,0.0094 -2.791735,0.01329 l -0.422229,0.0074 -0.01329,0.165348 c -0.0076,0.09114 -0.0079,0.609696 0,1.151536 l 0.01476,0.98471 1.632817,0.0044 c 0.89837,0.0028 2.155095,0.0077 2.791734,0.01033 l 1.157441,0.0044 v -1.173679 z m -23.814632,0.0015 v 1.172204 1.172203 h 2.803545 1.759782 c -0.385609,-0.370285 -0.786092,-0.774633 -1.07329,-1.089597 -0.381128,-0.417969 -0.730483,-0.837777 -1.046715,-1.254878 z m -3.459034,2.657388 v 1.153012 1.153012 h 2.794687 2.793211 v -1.153012 -1.153012 h -2.793211 z m 6.076562,0 v 1.153012 1.153012 h 2.793211 2.328168 c -0.07619,-0.05511 -0.151112,-0.110536 -0.219973,-0.16092 -0.886254,-0.648441 -1.71038,-1.316794 -2.469896,-2.003376 -0.05039,-0.04555 -0.102102,-0.0928 -0.155014,-0.141728 z m 9.198994,0 c -0.214775,0.197319 -0.435669,0.39427 -0.662871,0.589055 -0.699841,0.59999 -1.398707,1.151033 -2.179058,1.716969 h 2.502374 2.803545 v -1.153012 -1.153012 z m 2.933462,0 v 1.153012 1.153012 h 2.79321 2.793211 v -1.15308 -1.153012 H 38.012906 Z M 14.413819,35.63493 v 1.163346 1.16187 h 2.793211 2.79321 v -1.16187 -1.163346 h -2.79321 z m 6.055893,0 v 1.163346 1.16187 h 2.803545 2.803546 v -1.16187 -1.163346 h -2.803546 z m 6.075086,0 v 1.163346 1.16187 h 2.793211 2.794687 v -1.16187 -1.163346 h -2.794687 -0.336603 c -0.07701,0.05216 -0.13533,0.09026 -0.157967,0.101867 -0.02842,0.01457 -0.03031,0.01478 -0.0871,-0.02362 -0.02394,-0.01617 -0.06228,-0.04407 -0.110725,-0.07825 z m 6.076562,0 v 1.163346 1.16187 h 2.793211 2.793211 v -1.16187 -1.163346 h -2.793211 z m 6.055893,0 v 1.163346 1.16187 h 2.803546 2.803545 v -1.16187 -1.163346 h -2.803545 z" /> 41 <path d="m 20.990146,12.712514 c -1.997501,0 -3.61621,1.619907 -3.61621,3.616264 0,1.996302 1.619853,3.61621 3.61621,3.61621 1.996302,0 3.61621,-1.618709 3.61621,-3.61621 0,-1.997555 -1.619908,-3.616264 -3.61621,-3.616264 z" 42 fill="#e5503c" id="path10" style={{strokeWidth:0.544946}} /> 43 <path d="m 17.259879,22.659039 c -0.118853,-0.462333 -0.327077,-0.889353 -0.604673,-1.259916 -0.659985,-0.882323 -1.712821,-1.452827 -2.898624,-1.452827 -1.997501,0 -3.61621,-1.618709 -3.61621,-3.61621 0,-1.997556 1.619853,-3.616264 3.61621,-3.616264 1.996302,0 3.61621,-1.618709 3.61621,-3.6161885 0,-1.9975065 -1.618709,-3.6185662 -3.61621,-3.6185662 -1.997501,0 -3.61621,1.6187109 -3.61621,3.616212 0,1.9974897 -1.6199079,3.6161987 -3.6162265,3.6161987 -1.9963294,0 -3.6173924,1.619908 -3.6173924,3.617409 0,1.997501 1.6198859,3.61621 3.6162154,3.61621 1.9963512,0 3.6162045,1.619908 3.6162045,3.61621 0,1.996356 -1.6198533,3.61621 -3.6162045,3.61621 -1.9963295,0 -3.6162154,1.621052 -3.6162154,3.618553 0,1.997555 1.6198859,3.616264 3.6162154,3.616264 1.9963512,0 3.6162045,-1.619907 3.6162045,-3.616264 0,-1.996302 1.619908,-3.61621 3.61621,-3.61621 1.185803,0 2.238694,-0.570504 2.898624,-1.452827 0.27765,-0.371708 0.485874,-0.797584 0.604673,-1.259916 0.01531,-0.0576 0.02823,-0.116455 0.04,-0.175255 0.04823,-0.235308 0.07291,-0.47879 0.07291,-0.729356 0,-0.250567 -0.02469,-0.494103 -0.07291,-0.729357 -0.01177,-0.05885 -0.02589,-0.117654 -0.04,-0.175309" 44 fill="#FFF8ED" id="path11" style={{fill:"#3a5dae",fillOpacity:1,strokeWidth:0.544946}} /> 45 </g> 46 </svg> 47 ); 3 48 4 49 registerBlockType('share-one/wall-of-love', { 5 50 title: 'Share.one - Wall of Love', 6 icon: 'heart',51 icon: wolIcon, 7 52 category: 'widgets', 53 8 54 edit() { 9 const randomId = Math.random().toString(36).substring(7);10 55 const { serverUrl, uuid } = shareOneData; 11 setTimeout(() => { 12 const wol_js_url = `${serverUrl}/walloflove/${uuid}.js?div_id=${randomId}`; 13 const script = document.createElement('script'); 14 script.src = wol_js_url; 15 script.defer = true; 16 document.body.appendChild(script); 17 }, 1000); 56 57 const containerRef = useRef(null); 58 59 // Stable per block instance, not per render 60 const divId = useMemo( 61 () => `shareone-carousel-${Math.random().toString(36).slice(2, 10)}`, 62 [] 63 ); 64 65 useEffect(() => { 66 if (!uuid || !serverUrl) return; 67 68 const container = containerRef.current; 69 if (!container) return; 70 71 const doc = container.ownerDocument; // iframe-safe 72 73 // Ensure the container has the expected id 74 container.id = divId; 75 76 // Remove previous loader if any 77 const loaderId = `${divId}-loader`; 78 container.querySelector(`#${CSS.escape(loaderId)}`)?.remove(); 79 80 const s = doc.createElement('script'); 81 s.id = loaderId; 82 s.src = `${serverUrl}/walloflove/${uuid}.js?div_id=${encodeURIComponent(divId)}&ts=${Date.now()}`; 83 84 // For dynamically inserted scripts, this is more reliable than "defer" 85 s.async = false; 86 87 // Append inside container (matches vendor assumptions) 88 container.appendChild(s); 89 90 return () => { 91 container.querySelector(`#${CSS.escape(loaderId)}`)?.remove(); 92 }; 93 }, [uuid, serverUrl, divId]); 18 94 19 95 return ( 20 96 <div {...useBlockProps()}> 21 97 {uuid ? ( 22 < p id={randomId}></p>98 <div ref={containerRef} /> 23 99 ) : ( 24 100 <p><em>No UUID defined in Share.one settings.</em></p> … … 36 112 }); 37 113 114 115 38 116 registerBlockType('share-one/catch-widget', { 39 117 title: 'Share.one - Inline Catch widget', 40 icon: 'heart',118 icon: inlineIcon, 41 119 category: 'widgets', 120 42 121 edit() { 43 const randomId = Math.random().toString(36).substring(7);44 122 const { serverUrl, uuid } = shareOneData; 45 setTimeout(() => { 46 const widget_js_url = `${serverUrl}/inline-widget/${uuid}.js?div_id=${randomId}`; 47 const script = document.createElement('script'); 48 script.src = widget_js_url; 49 script.defer = true; 50 document.body.appendChild(script); 51 }, 1000); 123 124 const containerRef = useRef(null); 125 126 // Stable per block instance, not per render 127 const divId = useMemo( 128 () => `shareone-carousel-${Math.random().toString(36).slice(2, 10)}`, 129 [] 130 ); 131 132 useEffect(() => { 133 if (!uuid || !serverUrl) return; 134 135 const container = containerRef.current; 136 if (!container) return; 137 138 const doc = container.ownerDocument; // iframe-safe 139 140 // Ensure the container has the expected id 141 container.id = divId; 142 143 // Remove previous loader if any 144 const loaderId = `${divId}-loader`; 145 container.querySelector(`#${CSS.escape(loaderId)}`)?.remove(); 146 147 const s = doc.createElement('script'); 148 s.id = loaderId; 149 s.src = `${serverUrl}/inline-widget/${uuid}.js?div_id=${encodeURIComponent(divId)}&ts=${Date.now()}`; 150 151 // For dynamically inserted scripts, this is more reliable than "defer" 152 s.async = false; 153 154 // Append inside container (matches vendor assumptions) 155 container.appendChild(s); 156 157 return () => { 158 container.querySelector(`#${CSS.escape(loaderId)}`)?.remove(); 159 }; 160 }, [uuid, serverUrl, divId]); 52 161 53 162 return ( 54 163 <div {...useBlockProps()}> 55 164 {uuid ? ( 56 < p id={randomId}></p>165 <div ref={containerRef} /> 57 166 ) : ( 58 167 <p><em>No UUID defined in Share.one settings.</em></p> … … 61 170 ); 62 171 }, 172 63 173 save() { 64 174 return ( … … 69 179 }, 70 180 }); 181 182 registerBlockType('share-one/carousel-widget', { 183 title: 'Share.one - Carousel Catch widget', 184 icon: carouselIcon, 185 category: 'widgets', 186 attributes: { 187 displayMode: { 188 type: 'string', 189 default: 'fullwidth' 190 } 191 }, 192 193 edit({ attributes, setAttributes }) { 194 const { displayMode } = attributes; 195 const { serverUrl, uuid } = shareOneData; 196 197 const containerRef = useRef(null); 198 199 // Stable per block instance, not per render 200 const divId = useMemo( 201 () => `shareone-carousel-${Math.random().toString(36).slice(2, 10)}`, 202 [] 203 ); 204 205 useEffect(() => { 206 if (!uuid || !serverUrl) return; 207 208 const container = containerRef.current; 209 if (!container) return; 210 211 const doc = container.ownerDocument; // iframe-safe 212 213 // Ensure the container has the expected id 214 container.id = divId; 215 216 // Remove previous loader if any 217 const loaderId = `${divId}-loader`; 218 container.querySelector(`#${CSS.escape(loaderId)}`)?.remove(); 219 220 const s = doc.createElement('script'); 221 s.id = loaderId; 222 223 let scriptUrl = `${serverUrl}/carousel-widget/${uuid}.js?div_id=${encodeURIComponent(divId)}&ts=${Date.now()}`; 224 225 // Add display_mode parameter if set to container 226 if (displayMode === 'container') { 227 scriptUrl += '&display_mode=container'; 228 } 229 230 s.src = scriptUrl; 231 232 // For dynamically inserted scripts, this is more reliable than "defer" 233 s.async = false; 234 235 // Append inside container (matches vendor assumptions) 236 container.appendChild(s); 237 238 return () => { 239 container.querySelector(`#${CSS.escape(loaderId)}`)?.remove(); 240 }; 241 }, [uuid, serverUrl, divId, displayMode]); 242 243 return ( 244 <> 245 <InspectorControls> 246 <PanelBody title={__('Carousel Settings', 'share-one')}> 247 <ToggleControl 248 label={__('Container Mode', 'share-one')} 249 help={__('Enable to fit the carousel inside the container width instead of full viewport width', 'share-one')} 250 checked={displayMode === 'container'} 251 onChange={(value) => setAttributes({ displayMode: value ? 'container' : 'viewport' })} 252 /> 253 </PanelBody> 254 </InspectorControls> 255 <div {...useBlockProps()}> 256 {uuid ? ( 257 <div ref={containerRef} /> 258 ) : ( 259 <p><em>No UUID defined in Share.one settings.</em></p> 260 )} 261 </div> 262 </> 263 ); 264 }, 265 266 save({ attributes }) { 267 const { displayMode } = attributes; 268 const shortcode = displayMode === 'container' 269 ? '[share_one_carousel_widget display_mode="container"]' 270 : '[share_one_carousel_widget]'; 271 272 return ( 273 <div {...useBlockProps.save()}> 274 <p>{shortcode}</p> 275 </div> 276 ); 277 }, 278 });
Note: See TracChangeset
for help on using the changeset viewer.