Changeset 3461135
- Timestamp:
- 02/14/2026 12:50:41 AM (5 days ago)
- Location:
- random-image-block-for-block-editor
- Files:
-
- 17 added
- 20 edited
- 1 copied
-
assets/README.md (added)
-
assets/banner-1544x500.html (added)
-
assets/banner-1544x500.png (added)
-
assets/banner-772x250.html (added)
-
assets/banner-772x250.png (added)
-
tags/1.1.0 (copied) (copied from random-image-block-for-block-editor/trunk)
-
tags/1.1.0/.distignore (modified) (1 diff)
-
tags/1.1.0/.wordpress-org/banner-1544x500.png (added)
-
tags/1.1.0/.wordpress-org/banner-772x250.png (added)
-
tags/1.1.0/FEATURES.md (modified) (1 diff)
-
tags/1.1.0/PRO-CODE-SEPARATION.md (added)
-
tags/1.1.0/build/block.json (modified) (3 diffs)
-
tags/1.1.0/build/frontend.asset.php (added)
-
tags/1.1.0/build/frontend.js (added)
-
tags/1.1.0/build/index.asset.php (modified) (1 diff)
-
tags/1.1.0/build/index.js (modified) (1 diff)
-
tags/1.1.0/build/style-index.css (modified) (1 diff)
-
tags/1.1.0/includes/class-generate-css.php (modified) (1 diff)
-
tags/1.1.0/languages/random-image-block-for-block-editor.pot (modified) (3 diffs)
-
tags/1.1.0/random-image-block.php (modified) (3 diffs)
-
tags/1.1.0/random-image-block.php.bak2 (added)
-
tags/1.1.0/readme.txt (modified) (4 diffs)
-
trunk/.distignore (modified) (1 diff)
-
trunk/.wordpress-org/banner-1544x500.png (added)
-
trunk/.wordpress-org/banner-772x250.png (added)
-
trunk/FEATURES.md (modified) (1 diff)
-
trunk/PRO-CODE-SEPARATION.md (added)
-
trunk/build/block.json (modified) (3 diffs)
-
trunk/build/frontend.asset.php (added)
-
trunk/build/frontend.js (added)
-
trunk/build/index.asset.php (modified) (1 diff)
-
trunk/build/index.js (modified) (1 diff)
-
trunk/build/style-index.css (modified) (1 diff)
-
trunk/includes/class-generate-css.php (modified) (1 diff)
-
trunk/languages/random-image-block-for-block-editor.pot (modified) (3 diffs)
-
trunk/random-image-block.php (modified) (3 diffs)
-
trunk/random-image-block.php.bak2 (added)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
random-image-block-for-block-editor/tags/1.1.0/.distignore
r3449156 r3461135 35 35 *.spec.js 36 36 coverage 37 38 .wordpress-org/banner-772x250.html 39 .wordpress-org/banner-1544x500.html 40 .wordpress-org/README.md -
random-image-block-for-block-editor/tags/1.1.0/FEATURES.md
r3449156 r3461135 8 8 9 9 ### 1. Link Options 10 - [ ] Link to attachment page11 - [ ] Link to custom URL10 - [x] Link to attachment page 11 - [x] Link to custom URL 12 12 - [ ] Lightbox/Modal integration 13 - [ ] Open in new tab option13 - [x] Open in new tab option 14 14 15 15 ### 2. Image Shuffle Animation 16 - [ ] Fade transition17 - [ ] Slide transition18 - [ ] Zoom transition19 - [ ] Transition duration control16 - [x] Fade transition 17 - [x] Slide transition 18 - [x] Zoom transition 19 - [x] Transition duration control 20 20 21 21 ### 3. Auto-refresh Interval 22 - [ ] Auto-rotate images every X seconds23 - [ ] Enable/disable toggle24 - [ ] Custom time interval (seconds)22 - [x] Auto-rotate images every X seconds 23 - [x] Enable/disable toggle 24 - [x] Custom time interval (seconds) 25 25 26 26 ### 4. Image Filters (CSS) 27 - [ ] Grayscale28 - [ ] Blur29 - [ ] Brightness30 - [ ] Contrast31 - [ ] Saturation32 - [ ] Hue Rotate27 - [x] Grayscale 28 - [x] Blur 29 - [x] Brightness 30 - [x] Contrast 31 - [x] Saturation 32 - [x] Hue Rotate 33 33 34 34 ### 5. Random Seed/Sticky Mode 35 - [ ] Keep same random image for session duration36 - [ ] Cookie-based persistence37 - [ ] Local storage option35 - [x] Keep same random image for session duration 36 - [x] Cookie-based persistence (using Local Storage) 37 - [x] Local storage option 38 38 39 39 --- -
random-image-block-for-block-editor/tags/1.1.0/build/block.json
r3449156 r3461135 47 47 "type": "array", 48 48 "default": [] 49 }, 50 "selectedImageIndex": { 51 "type": "number", 52 "default": 0 49 53 }, 50 54 "imageAlign": { … … 122 126 "openInNewTab": false 123 127 } 128 }, 129 "filterSettings": { 130 "type": "object", 131 "default": { 132 "grayscale": 0, 133 "blur": 0, 134 "brightness": 100, 135 "contrast": 100, 136 "saturate": 100, 137 "hueRotate": 0 138 } 139 }, 140 "autoRefresh": { 141 "type": "boolean", 142 "default": false 143 }, 144 "refreshInterval": { 145 "type": "number", 146 "default": 5 147 }, 148 "shuffleAnimation": { 149 "type": "string", 150 "default": "fade" 151 }, 152 "animationDuration": { 153 "type": "number", 154 "default": 500 155 }, 156 "stickyMode": { 157 "type": "boolean", 158 "default": false 159 }, 160 "uniqueId": { 161 "type": "string", 162 "default": "" 124 163 } 125 164 }, … … 127 166 "editorScript": "file:./index.js", 128 167 "editorStyle": "file:./index.css", 129 "style": "file:./style-index.css" 168 "style": "file:./style-index.css", 169 "viewScript": "file:./frontend.js" 130 170 } -
random-image-block-for-block-editor/tags/1.1.0/build/index.asset.php
r3449156 r3461135 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => ' dd9bc390fd6f5685dae6');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '512cd438f6840c0b4013'); -
random-image-block-for-block-editor/tags/1.1.0/build/index.js
r3449156 r3461135 1 (()=>{"use strict";var e,t={411(e,t,a){const l=window.wp.blocks,o=window.wp.i18n,n=JSON.parse('{"DD":"Random Image Block","L1":"widgets","Kk":"image-flip-horizontal","h_":"Display random images from a gallery.","uK":{"images":{"type":"array","default":[]}," imageAlign":{"type":"string","default":"center"},"imageObjectFit":{"type":"string","default":""},"captionStyle":{"type":"object","default":{"color":"#ffffff","fontSize":16,"fontSizeUnit":"px","showCaptionOn":"","captionOverlay":{"enabled":"no","position":{"x":0.5,"y":0.5}},"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"imageSize":{"type":"object","default":{"desktop":{"width":100,"widthUnit":"%","height":100,"heightUnit":"%"},"tablet":{"width":"","widthUnit":"%","height":"","heightUnit":"%"},"mobile":{"width":"","widthUnit":"%","height":"","heightUnit":"%"}}},"linkSettings":{"type":"object","default":{"enabled":"none","customUrl":"","openInNewTab":false}}}}'),i=window.wp.element,r=window.wp.blockEditor,m=window.wp.serverSideRender;var c=a.n(m);const d=window.wp.components,g=({attributes:e,setAttributes:t})=>{const{images:a}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(r.BlockControls,null,(0,i.createElement)(d.ToolbarGroup,null,(0,i.createElement)(r.MediaUploadCheck,null,(0,i.createElement)(r.MediaUpload,{multiple:!0,gallery:!0,addToGallery:!0,allowedTypes:["image"],value:a.map(e=>e.id),onSelect:e=>{const a=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption}));t({images:a})},render:({open:e})=>(0,i.createElement)(d.ToolbarButton,{label:(0,o.__)("Edit Images","random-image-block"),icon:"edit",onClick:e})})))))},b=()=>(0,i.createElement)("div",{className:"ud-upgrade"},(0,i.createElement)("p",null,(0,o.__)("Upgrade to Random Image Block Pro to use this feature. We have some features in mind and those will be added to pro version in the future InshAllah. Also you can suggest some too","random-image-block-for-block-editor")," "," ",(0,i.createElement)("a",{href:"https://ultradevs.com/contact-us/",target:"_blank"},(0,o.__)("Here","random-image-block-for-block-editor"))),(0,i.createElement)("a",{href:ultraDevsRandomImageBlock.upgradeLink,target:"_blank",rel:"noreferrer"},(0,o.__)("Upgrade Now","random-image-block-for-block-editor"))),s=({imageSizes:e,onChange:t})=>(0,i.createElement)("div",{className:"udb-image-size"},(0,i.createElement)(d.TabPanel,{className:"udb-image-size__tabs",activeClass:"active-tab",tabs:[{name:"desktop",title:"Desktop",className:"desktop-tab"},{name:"tablet",title:"Tablet",className:"tablet-tab"},{name:"mobile",title:"Mobile",className:"mobile-tab"}]},a=>"mobile"!==a.name&&"tablet"!==a.name||ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,i.createElement)("div",{className:"udb-image-size__tabs__content"},(0,i.createElement)("div",{className:"udb-image-size__tabs__content__width"},(0,i.createElement)("label",{htmlFor:"width"},"Width:"),(0,i.createElement)("input",{type:"number",id:"width",value:e[a.name].width,onChange:l=>t({...e,[a.name]:{...e[a.name],width:Number(l.target.value)}})}),(0,i.createElement)("select",{value:e[a.name].widthUnit,onChange:l=>t({...e,[a.name]:{...e[a.name],widthUnit:l.target.value}})},(0,i.createElement)("option",{value:"%"},"%"),(0,i.createElement)("option",{value:"px"},"px"),(0,i.createElement)("option",{value:"em"},"em"),(0,i.createElement)("option",{value:"rem"},"rem"),(0,i.createElement)("option",{value:"vw"},"vw"))),(0,i.createElement)("div",{className:"udb-image-size__tabs__content__height"},(0,i.createElement)("label",{htmlFor:"height"},"Height:"),(0,i.createElement)("input",{type:"number",id:"height",value:e[a.name].height,onChange:l=>t({...e,[a.name]:{...e[a.name],height:Number(l.target.value)}})}),(0,i.createElement)("select",{value:e[a.name].heightUnit,onChange:l=>t({...e,[a.name]:{...e[a.name],heightUnit:l.target.value}})},(0,i.createElement)("option",{value:"%"},"%"),(0,i.createElement)("option",{value:"px"},"px"),(0,i.createElement)("option",{value:"em"},"em"),(0,i.createElement)("option",{value:"rem"},"rem"),(0,i.createElement)("option",{value:"vh"},"vh")))):(0,i.createElement)(b,null))),u=e=>{const{attributes:t,setAttributes:a}=e,{images:l,imageSize:n,imageAlign:m,imageObjectFit:c,captionStyle:g,linkSettings:u}=t;return(0,i.createElement)(r.InspectorControls,null,(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Images","random-image-block-for-block-editor")},(0,i.createElement)(r.MediaUploadCheck,null,(0,i.createElement)(r.MediaUpload,{multiple:!0,gallery:!0,addToGallery:!0,allowedTypes:["image"],value:l.map(e=>e.id),onSelect:e=>{const t=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption}));a({images:t})},render:({open:e})=>(0,i.createElement)(i.Fragment,null,l?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.Button,{label:(0,o.__)("Edit Images","random-image-block-for-block-editor"),icon:"edit",onClick:e},(0,o.__)("Open Gallery","random-image-block-for-block-editor")),(0,i.createElement)("div",{className:"random-image-block__images"},l.map(e=>(0,i.createElement)("div",{className:"random-image-block__images__image",key:e.id},(0,i.createElement)("div",{className:"random-image-block__images__image__action"},(0,i.createElement)(d.Button,{label:(0,o.__)("Remove Image","random-image-block-for-block-editor"),icon:"trash",onClick:()=>{const t=l.filter(t=>t.id!==e.id);a({images:t})}})),(0,i.createElement)("img",{src:e.url,alt:e.alt}))))):(0,i.createElement)(d.Button,{label:(0,o.__)("Select Images","random-image-block-for-block-editor"),icon:"edit",onClick:e}))}))),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Image Setting","random-image-block-for-block-editor")},(0,i.createElement)(s,{imageSizes:n,onChange:e=>{a({imageSize:e})}}),ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Image Object Fit","random-image-block-for-block-editor"),value:c,options:[{label:(0,o.__)("","random-image-block-for-block-editor"),value:""},{label:(0,o.__)("Fill","random-image-block-for-block-editor"),value:"fill"},{label:(0,o.__)("Contain","random-image-block-for-block-editor"),value:"contain"},{label:(0,o.__)("Cover","random-image-block-for-block-editor"),value:"cover"},{label:(0,o.__)("Scale Down","random-image-block-for-block-editor"),value:"scale-down"},{label:(0,o.__)("Initial","random-image-block-for-block-editor"),value:"initial"},{label:(0,o.__)("Inherit","random-image-block-for-block-editor"),value:"inherit"}],onChange:e=>a({imageObjectFit:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("p",null,"Image Object Fit"),(0,i.createElement)(b,null))),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Link Settings","random-image-block-for-block-editor")},(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Link To","random-image-block-for-block-editor"),value:u.enabled,options:[{label:(0,o.__)("None","random-image-block-for-block-editor"),value:"none"},{label:(0,o.__)("Attachment Page","random-image-block-for-block-editor"),value:"attachment"},{label:(0,o.__)("Custom URL","random-image-block-for-block-editor"),value:"custom"}],onChange:e=>a({linkSettings:{...u,enabled:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"custom"===u.enabled&&(0,i.createElement)(d.TextControl,{label:(0,o.__)("Custom URL","random-image-block-for-block-editor"),value:u.customUrl,onChange:e=>a({linkSettings:{...u,customUrl:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"none"!==u.enabled&&(0,i.createElement)(d.ToggleControl,{label:(0,o.__)("Open in new tab","random-image-block-for-block-editor"),checked:u.openInNewTab,onChange:e=>a({linkSettings:{...u,openInNewTab:e}})})),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Caption Setting","random-image-block-for-block-editor")},(0,i.createElement)(d.__experimentalToggleGroupControl,{label:(0,o.__)("Image Text Alignment","random-image-block-for-block-editor"),className:"random-image-block__alignment",value:m,onChange:e=>a({imageAlign:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0},(0,i.createElement)(d.__experimentalToggleGroupControlOption,{value:"left",label:(0,o.__)("Left","random-image-block-for-block-editor")}),(0,i.createElement)(d.__experimentalToggleGroupControlOption,{value:"center",label:(0,o.__)("Center","random-image-block-for-block-editor")}),(0,i.createElement)(d.__experimentalToggleGroupControlOption,{value:"right",label:(0,o.__)("Right","random-image-block-for-block-editor")})),(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Show Caption On","random-image-block-for-block-editor"),value:g.showCaptionOn,options:[{label:(0,o.__)("Default","random-image-block-for-block-editor"),value:""},{label:(0,o.__)("Hover","random-image-block-for-block-editor"),value:"hover"}],onChange:e=>a({captionStyle:{...g,showCaptionOn:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Caption Over Image?","random-image-block-for-block-editor"),value:g.captionOverlay.enabled,options:[{label:(0,o.__)("No","random-image-block-for-block-editor"),value:"no"},{label:(0,o.__)("Yes","random-image-block-for-block-editor"),value:"yes"}],onChange:e=>a({captionStyle:{...g,captionOverlay:{...g.captionOverlay,enabled:e}}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"yes"===g.captionOverlay.enabled&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.FocalPointPicker,{url:l[0]?.url,value:g.captionOverlay.position,onChange:e=>a({captionStyle:{...g,captionOverlay:{...g.captionOverlay,position:e}}})}))):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("p",null,"Caption Over Image?"),(0,i.createElement)(b,null))))};(0,l.registerBlockType)("ultradevs/random-image-block",{title:n.DD,description:n.h_,attributes:n.uK,icon:n.Kk,category:n.L1,keywords:[(0,o.__)("random image","random-image-block"),(0,o.__)("image","random-image-block"),(0,o.__)("random","random-image-block")],edit:function(e){const{attributes:t,setAttributes:a}=e,{images:l}=t;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(g,{attributes:t,setAttributes:a}),(0,i.createElement)(u,{attributes:t,setAttributes:a}),(0,i.createElement)("div",(0,r.useBlockProps)(),l.length?(0,i.createElement)(c(),{block:"ultradevs/random-image-block",attributes:t}):(0,i.createElement)(r.MediaPlaceholder,{multiple:!0,gallery:!0,icon:(0,i.createElement)(r.BlockIcon,{icon:"format-gallery"}),allowedTypes:["image"],labels:{title:(0,o.__)("Random Image","random-image-block"),instructions:(0,o.__)("Select Images","random-image-block")},onSelect:e=>{const t=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption}));a({images:t})}})))},save:()=>null})}},a={};function l(e){var o=a[e];if(void 0!==o)return o.exports;var n=a[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=(t,a,o,n)=>{if(!a){var i=1/0;for(d=0;d<e.length;d++){for(var[a,o,n]=e[d],r=!0,m=0;m<a.length;m++)(!1&n||i>=n)&&Object.keys(l.O).every(e=>l.O[e](a[m]))?a.splice(m--,1):(r=!1,n<i&&(i=n));if(r){e.splice(d--,1);var c=o();void 0!==c&&(t=c)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[a,o,n]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};l.O.j=t=>0===e[t];var t=(t,a)=>{var o,n,[i,r,m]=a,c=0;if(i.some(t=>0!==e[t])){for(o in r)l.o(r,o)&&(l.m[o]=r[o]);if(m)var d=m(l)}for(t&&t(a);c<i.length;c++)n=i[c],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return l.O(d)},a=globalThis.webpackChunkrandom_image_block=globalThis.webpackChunkrandom_image_block||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var o=l.O(void 0,[350],()=>l(411));o=l.O(o)})();1 (()=>{"use strict";var e,t={411(e,t,a){const l=window.wp.blocks,o=window.wp.i18n,n=JSON.parse('{"DD":"Random Image Block","L1":"widgets","Kk":"image-flip-horizontal","h_":"Display random images from a gallery.","uK":{"images":{"type":"array","default":[]},"selectedImageIndex":{"type":"number","default":0},"imageAlign":{"type":"string","default":"center"},"imageObjectFit":{"type":"string","default":""},"captionStyle":{"type":"object","default":{"color":"#ffffff","fontSize":16,"fontSizeUnit":"px","showCaptionOn":"","captionOverlay":{"enabled":"no","position":{"x":0.5,"y":0.5}},"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"imageSize":{"type":"object","default":{"desktop":{"width":100,"widthUnit":"%","height":100,"heightUnit":"%"},"tablet":{"width":"","widthUnit":"%","height":"","heightUnit":"%"},"mobile":{"width":"","widthUnit":"%","height":"","heightUnit":"%"}}},"linkSettings":{"type":"object","default":{"enabled":"none","customUrl":"","openInNewTab":false}},"filterSettings":{"type":"object","default":{"grayscale":0,"blur":0,"brightness":100,"contrast":100,"saturate":100,"hueRotate":0}},"autoRefresh":{"type":"boolean","default":false},"refreshInterval":{"type":"number","default":5},"shuffleAnimation":{"type":"string","default":"fade"},"animationDuration":{"type":"number","default":500},"stickyMode":{"type":"boolean","default":false},"uniqueId":{"type":"string","default":""}}}'),r=window.wp.element,i=window.wp.blockEditor,m=window.wp.serverSideRender;var c=a.n(m);const g=window.wp.components,d=({attributes:e,setAttributes:t})=>{const{images:a,selectedImageIndex:l}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(g.ToolbarGroup,null,a.length>1&&(0,r.createElement)(g.ToolbarButton,{label:(0,o.__)("Shuffle Image","random-image-block-for-block-editor"),icon:"randomize",onClick:()=>{if(a.length>1){let e;do{e=Math.floor(Math.random()*a.length)}while(e===l);t({selectedImageIndex:e})}}}),(0,r.createElement)(i.MediaUploadCheck,null,(0,r.createElement)(i.MediaUpload,{multiple:!0,gallery:!0,addToGallery:!0,allowedTypes:["image"],value:a.map(e=>e.id),onSelect:e=>{const a=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption}));t({images:a})},render:({open:e})=>(0,r.createElement)(g.ToolbarButton,{label:(0,o.__)("Edit Images","random-image-block"),icon:"edit",onClick:e})})))))},s=()=>(0,r.createElement)("div",{className:"ud-upgrade"},(0,r.createElement)("p",null,(0,o.__)("Upgrade to Random Image Block Pro to use this feature. We have some features in mind and those will be added to pro version in the future InshAllah. Also you can suggest some too","random-image-block-for-block-editor")," "," ",(0,r.createElement)("a",{href:"https://ultradevs.com/contact-us/",target:"_blank"},(0,o.__)("Here","random-image-block-for-block-editor"))),(0,r.createElement)("a",{href:ultraDevsRandomImageBlock.upgradeLink,target:"_blank",rel:"noreferrer"},(0,o.__)("Upgrade Now","random-image-block-for-block-editor"))),b=({imageSizes:e,onChange:t})=>(0,r.createElement)("div",{className:"udb-image-size"},(0,r.createElement)(g.TabPanel,{className:"udb-image-size__tabs",activeClass:"active-tab",tabs:[{name:"desktop",title:"Desktop",className:"desktop-tab"},{name:"tablet",title:"Tablet",className:"tablet-tab"},{name:"mobile",title:"Mobile",className:"mobile-tab"}]},a=>"mobile"!==a.name&&"tablet"!==a.name||ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)("div",{className:"udb-image-size__tabs__content"},(0,r.createElement)("div",{className:"udb-image-size__tabs__content__width"},(0,r.createElement)("label",{htmlFor:"width"},"Width:"),(0,r.createElement)("input",{type:"number",id:"width",value:e[a.name].width,onChange:l=>t({...e,[a.name]:{...e[a.name],width:Number(l.target.value)}})}),(0,r.createElement)("select",{value:e[a.name].widthUnit,onChange:l=>t({...e,[a.name]:{...e[a.name],widthUnit:l.target.value}})},(0,r.createElement)("option",{value:"%"},"%"),(0,r.createElement)("option",{value:"px"},"px"),(0,r.createElement)("option",{value:"em"},"em"),(0,r.createElement)("option",{value:"rem"},"rem"),(0,r.createElement)("option",{value:"vw"},"vw"))),(0,r.createElement)("div",{className:"udb-image-size__tabs__content__height"},(0,r.createElement)("label",{htmlFor:"height"},"Height:"),(0,r.createElement)("input",{type:"number",id:"height",value:e[a.name].height,onChange:l=>t({...e,[a.name]:{...e[a.name],height:Number(l.target.value)}})}),(0,r.createElement)("select",{value:e[a.name].heightUnit,onChange:l=>t({...e,[a.name]:{...e[a.name],heightUnit:l.target.value}})},(0,r.createElement)("option",{value:"%"},"%"),(0,r.createElement)("option",{value:"px"},"px"),(0,r.createElement)("option",{value:"em"},"em"),(0,r.createElement)("option",{value:"rem"},"rem"),(0,r.createElement)("option",{value:"vh"},"vh")))):(0,r.createElement)(s,null))),u=e=>{const{attributes:t,setAttributes:a}=e,{images:l,imageSize:n,imageAlign:m,imageObjectFit:c,captionStyle:d,linkSettings:u,filterSettings:_}=t;return(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Images","random-image-block-for-block-editor")},(0,r.createElement)(i.MediaUploadCheck,null,(0,r.createElement)(i.MediaUpload,{multiple:!0,gallery:!0,addToGallery:!0,allowedTypes:["image"],value:l.map(e=>e.id),onSelect:e=>{const t=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption,link:e.link})),l=e.length>1?Math.floor(Math.random()*e.length):0;a({images:t,selectedImageIndex:l})},render:({open:e})=>(0,r.createElement)(r.Fragment,null,l?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Edit Images","random-image-block-for-block-editor"),icon:"edit",onClick:e},(0,o.__)("Open Gallery","random-image-block-for-block-editor")),(0,r.createElement)("div",{className:"random-image-block__images"},l.map(e=>(0,r.createElement)("div",{className:"random-image-block__images__image",key:e.id},(0,r.createElement)("div",{className:"random-image-block__images__image__action"},(0,r.createElement)(g.Button,{label:(0,o.__)("Remove Image","random-image-block-for-block-editor"),icon:"trash",onClick:()=>{const t=l.filter(t=>t.id!==e.id);a({images:t})}})),(0,r.createElement)("img",{src:e.url,alt:e.alt}))))):(0,r.createElement)(g.Button,{label:(0,o.__)("Select Images","random-image-block-for-block-editor"),icon:"edit",onClick:e}))}))),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Image Setting","random-image-block-for-block-editor")},(0,r.createElement)(b,{imageSizes:n,onChange:e=>{a({imageSize:e})}}),ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Image Object Fit","random-image-block-for-block-editor"),value:c,options:[{label:(0,o.__)("","random-image-block-for-block-editor"),value:""},{label:(0,o.__)("Fill","random-image-block-for-block-editor"),value:"fill"},{label:(0,o.__)("Contain","random-image-block-for-block-editor"),value:"contain"},{label:(0,o.__)("Cover","random-image-block-for-block-editor"),value:"cover"},{label:(0,o.__)("Scale Down","random-image-block-for-block-editor"),value:"scale-down"},{label:(0,o.__)("Initial","random-image-block-for-block-editor"),value:"initial"},{label:(0,o.__)("Inherit","random-image-block-for-block-editor"),value:"inherit"}],onChange:e=>a({imageObjectFit:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,"Image Object Fit"),(0,r.createElement)(s,null))),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Link Settings","random-image-block-for-block-editor")},(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Link To","random-image-block-for-block-editor"),value:u.enabled,options:[{label:(0,o.__)("None","random-image-block-for-block-editor"),value:"none"},{label:(0,o.__)("Attachment Page","random-image-block-for-block-editor"),value:"attachment"},{label:(0,o.__)("Custom URL","random-image-block-for-block-editor"),value:"custom"}],onChange:e=>a({linkSettings:{...u,enabled:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"custom"===u.enabled&&(0,r.createElement)(g.TextControl,{label:(0,o.__)("Custom URL","random-image-block-for-block-editor"),value:u.customUrl,onChange:e=>a({linkSettings:{...u,customUrl:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"none"!==u.enabled&&(0,r.createElement)(g.ToggleControl,{label:(0,o.__)("Open in new tab","random-image-block-for-block-editor"),checked:u.openInNewTab,onChange:e=>a({linkSettings:{...u,openInNewTab:e}})})),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Image Filters","random-image-block-for-block-editor")},ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Grayscale","random-image-block-for-block-editor"),value:_.grayscale,onChange:e=>a({filterSettings:{..._,grayscale:e}}),min:0,max:100,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,grayscale:0}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Blur (px)","random-image-block-for-block-editor"),value:_.blur,onChange:e=>a({filterSettings:{..._,blur:e}}),min:0,max:20,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,blur:0}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Brightness (%)","random-image-block-for-block-editor"),value:_.brightness,onChange:e=>a({filterSettings:{..._,brightness:e}}),min:0,max:200,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,brightness:100}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Contrast (%)","random-image-block-for-block-editor"),value:_.contrast,onChange:e=>a({filterSettings:{..._,contrast:e}}),min:0,max:200,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,contrast:100}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Saturation (%)","random-image-block-for-block-editor"),value:_.saturate,onChange:e=>a({filterSettings:{..._,saturate:e}}),min:0,max:200,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,saturate:100}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Hue Rotate (deg)","random-image-block-for-block-editor"),value:_.hueRotate,onChange:e=>a({filterSettings:{..._,hueRotate:e}}),min:0,max:360,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,hueRotate:0}}),style:{marginTop:"24px"}})))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,"Image Object Fit"),(0,r.createElement)(s,null))),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Shuffle Settings","random-image-block-for-block-editor")},ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.ToggleControl,{label:(0,o.__)("Auto-refresh","random-image-block-for-block-editor"),checked:t.autoRefresh,onChange:e=>a({autoRefresh:e})}),t.autoRefresh&&(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Refresh Interval (seconds)","random-image-block-for-block-editor"),value:t.refreshInterval,onChange:e=>a({refreshInterval:e}),min:1,max:60,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Shuffle Animation","random-image-block-for-block-editor"),value:t.shuffleAnimation,options:[{label:(0,o.__)("None","random-image-block-for-block-editor"),value:"none"},{label:(0,o.__)("Fade","random-image-block-for-block-editor"),value:"fade"},{label:(0,o.__)("Slide","random-image-block-for-block-editor"),value:"slide"},{label:(0,o.__)("Zoom","random-image-block-for-block-editor"),value:"zoom"}],onChange:e=>a({shuffleAnimation:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"none"!==t.shuffleAnimation&&(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Animation Duration (ms)","random-image-block-for-block-editor"),value:t.animationDuration,onChange:e=>a({animationDuration:e}),min:100,max:2e3,step:100,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,r.createElement)(g.ToggleControl,{label:(0,o.__)("Sticky Mode","random-image-block-for-block-editor"),help:(0,o.__)("Keep same random image for session duration using local storage.","random-image-block-for-block-editor"),checked:t.stickyMode,onChange:e=>a({stickyMode:e})})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,"Image Object Fit"),(0,r.createElement)(s,null))),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Caption Setting","random-image-block-for-block-editor")},(0,r.createElement)(g.__experimentalToggleGroupControl,{label:(0,o.__)("Image Text Alignment","random-image-block-for-block-editor"),className:"random-image-block__alignment",value:m,onChange:e=>a({imageAlign:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0},(0,r.createElement)(g.__experimentalToggleGroupControlOption,{value:"left",label:(0,o.__)("Left","random-image-block-for-block-editor")}),(0,r.createElement)(g.__experimentalToggleGroupControlOption,{value:"center",label:(0,o.__)("Center","random-image-block-for-block-editor")}),(0,r.createElement)(g.__experimentalToggleGroupControlOption,{value:"right",label:(0,o.__)("Right","random-image-block-for-block-editor")})),(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Show Caption On","random-image-block-for-block-editor"),value:d.showCaptionOn,options:[{label:(0,o.__)("Default","random-image-block-for-block-editor"),value:""},{label:(0,o.__)("Hover","random-image-block-for-block-editor"),value:"hover"}],onChange:e=>a({captionStyle:{...d,showCaptionOn:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Caption Over Image?","random-image-block-for-block-editor"),value:d.captionOverlay.enabled,options:[{label:(0,o.__)("No","random-image-block-for-block-editor"),value:"no"},{label:(0,o.__)("Yes","random-image-block-for-block-editor"),value:"yes"}],onChange:e=>a({captionStyle:{...d,captionOverlay:{...d.captionOverlay,enabled:e}}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"yes"===d.captionOverlay.enabled&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.FocalPointPicker,{url:l[0]?.url,value:d.captionOverlay.position,onChange:e=>a({captionStyle:{...d,captionOverlay:{...d.captionOverlay,position:e}}})}))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,"Caption Over Image?"),(0,r.createElement)(s,null))))};(0,l.registerBlockType)("ultradevs/random-image-block",{title:n.DD,description:n.h_,attributes:n.uK,icon:n.Kk,category:n.L1,keywords:[(0,o.__)("random image","random-image-block"),(0,o.__)("image","random-image-block"),(0,o.__)("random","random-image-block")],edit:function(e){const{attributes:t,setAttributes:a}=e,{images:l,uniqueId:n}=t;return wp.element.useEffect(()=>{n||a({uniqueId:e.clientId})},[]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d,{attributes:t,setAttributes:a}),(0,r.createElement)(u,{attributes:t,setAttributes:a}),(0,r.createElement)("div",(0,i.useBlockProps)(),l.length?(0,r.createElement)(c(),{block:"ultradevs/random-image-block",attributes:t}):(0,r.createElement)(i.MediaPlaceholder,{multiple:!0,gallery:!0,icon:(0,r.createElement)(i.BlockIcon,{icon:"format-gallery"}),allowedTypes:["image"],labels:{title:(0,o.__)("Random Image","random-image-block"),instructions:(0,o.__)("Select Images","random-image-block")},onSelect:e=>{const t=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption})),l=e.length>1?Math.floor(Math.random()*e.length):0;a({images:t,selectedImageIndex:l})}})))},save:()=>null})}},a={};function l(e){var o=a[e];if(void 0!==o)return o.exports;var n=a[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=(t,a,o,n)=>{if(!a){var r=1/0;for(g=0;g<e.length;g++){for(var[a,o,n]=e[g],i=!0,m=0;m<a.length;m++)(!1&n||r>=n)&&Object.keys(l.O).every(e=>l.O[e](a[m]))?a.splice(m--,1):(i=!1,n<r&&(r=n));if(i){e.splice(g--,1);var c=o();void 0!==c&&(t=c)}}return t}n=n||0;for(var g=e.length;g>0&&e[g-1][2]>n;g--)e[g]=e[g-1];e[g]=[a,o,n]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};l.O.j=t=>0===e[t];var t=(t,a)=>{var o,n,[r,i,m]=a,c=0;if(r.some(t=>0!==e[t])){for(o in i)l.o(i,o)&&(l.m[o]=i[o]);if(m)var g=m(l)}for(t&&t(a);c<r.length;c++)n=r[c],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return l.O(g)},a=globalThis.webpackChunkrandom_image_block=globalThis.webpackChunkrandom_image_block||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var o=l.O(void 0,[350],()=>l(411));o=l.O(o)})(); -
random-image-block-for-block-editor/tags/1.1.0/build/style-index.css
r3449156 r3461135 1 .ud-random-img-block-pro.ud-radmon-img-block-caption-over-img .ud-random-img-block__content{left:var(--ud-rib-overlay-position-x,50%);position:absolute;top:var(--ud-rib-overlay-position-y,50%);transform:translate(var(--ud-rib-overlay-position-t-y,-50%),var(--ud-rib-overlay-position-t-x,-50%));z-index:999}.ud-random-img-block-caption-on-hover{transition:all .3s ease-in-out}.ud-random-img-block-caption-on-hover .ud-random-img-block__content-caption{opacity:0;transition:all .3s ease-in-out;visibility:hidden}.ud-random-img-block-caption-on-hover:hover .ud-random-img-block__content-caption{opacity:1;visibility:visible}.ud-random-img-block__images{ position:relative}.ud-random-img-block__images img{max-height:100%;max-width:100%}.ud-random-img-block__content figcaption{font-size:inherit;text-align:inherit!important}1 .ud-random-img-block-pro.ud-radmon-img-block-caption-over-img .ud-random-img-block__content{left:var(--ud-rib-overlay-position-x,50%);position:absolute;top:var(--ud-rib-overlay-position-y,50%);transform:translate(var(--ud-rib-overlay-position-t-y,-50%),var(--ud-rib-overlay-position-t-x,-50%));z-index:999}.ud-random-img-block-caption-on-hover{transition:all .3s ease-in-out}.ud-random-img-block-caption-on-hover .ud-random-img-block__content-caption{opacity:0;transition:all .3s ease-in-out;visibility:hidden}.ud-random-img-block-caption-on-hover:hover .ud-random-img-block__content-caption{opacity:1;visibility:visible}.ud-random-img-block__images{overflow:hidden;position:relative}.ud-random-img-block__images img{max-height:100%;max-width:100%;transition:all var(--ud-rib-anim-duration,.5s) ease-in-out}.ud-random-img-block.animating{pointer-events:none}.ud-random-img-block.animating-fade .ud-random-img-block__images img{opacity:0}.ud-random-img-block.animating-slide .ud-random-img-block__images img{opacity:1}.ud-random-img-block.animating-zoom .ud-random-img-block__images img{opacity:0;transform:scale(1.1)}.ud-random-img-block__content figcaption{font-size:inherit;text-align:inherit!important} -
random-image-block-for-block-editor/tags/1.1.0/includes/class-generate-css.php
r2985580 r3461135 118 118 $css .= ! empty( $this->attributes['imageObjectFit'] ) ? 'object-fit: ' . $this->attributes['imageObjectFit'] . '; ' : ''; 119 119 120 // Add CSS filters. 121 if ( isset( $this->attributes['filterSettings'] ) ) { 122 $filters = array(); 123 124 if ( ! empty( $this->attributes['filterSettings']['grayscale'] ) && $this->attributes['filterSettings']['grayscale'] > 0 ) { 125 $filters[] = 'grayscale(' . $this->attributes['filterSettings']['grayscale'] . '%)'; 126 } 127 if ( ! empty( $this->attributes['filterSettings']['blur'] ) && $this->attributes['filterSettings']['blur'] > 0 ) { 128 $filters[] = 'blur(' . $this->attributes['filterSettings']['blur'] . 'px)'; 129 } 130 if ( isset( $this->attributes['filterSettings']['brightness'] ) && $this->attributes['filterSettings']['brightness'] != 100 ) { 131 $filters[] = 'brightness(' . $this->attributes['filterSettings']['brightness'] . '%)'; 132 } 133 if ( isset( $this->attributes['filterSettings']['contrast'] ) && $this->attributes['filterSettings']['contrast'] != 100 ) { 134 $filters[] = 'contrast(' . $this->attributes['filterSettings']['contrast'] . '%)'; 135 } 136 if ( isset( $this->attributes['filterSettings']['saturate'] ) && $this->attributes['filterSettings']['saturate'] != 100 ) { 137 $filters[] = 'saturate(' . $this->attributes['filterSettings']['saturate'] . '%)'; 138 } 139 if ( ! empty( $this->attributes['filterSettings']['hueRotate'] ) && $this->attributes['filterSettings']['hueRotate'] > 0 ) { 140 $filters[] = 'hue-rotate(' . $this->attributes['filterSettings']['hueRotate'] . 'deg)'; 141 } 142 143 if ( ! empty( $filters ) ) { 144 $css .= 'filter: ' . implode( ' ', $filters ) . '; '; 145 } 146 } 147 120 148 $css .= '}'; 121 149 -
random-image-block-for-block-editor/tags/1.1.0/languages/random-image-block-for-block-editor.pot
r3224694 r3461135 1 # Copyright (C) 202 5ultraDevs1 # Copyright (C) 2026 ultraDevs 2 2 # This file is distributed under the GPL-2.0-or-later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Random Image Block for Block Editor 1. 0.4\n"5 "Project-Id-Version: Random Image Block for Block Editor 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/random-imaage-block\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-01-18T01:29:11+00:00\n"12 "POT-Creation-Date: 2026-02-14T00:48:28+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.10.0\n" 15 15 "X-Domain: random-image-block-for-block-editor\n" 16 16 … … 35 35 msgstr "" 36 36 37 #: random-image-block.php: 17138 #: random-image-block.php: 19037 #: random-image-block.php:219 38 #: random-image-block.php:238 39 39 msgid "Random Image Block Settings" 40 40 msgstr "" 41 41 42 #: random-image-block.php: 17242 #: random-image-block.php:220 43 43 msgid "Random Image Block" 44 44 msgstr "" 45 45 46 #: random-image-block.php: 19146 #: random-image-block.php:239 47 47 msgid "This plugin is developed by ultraDevs. If you need any help, please contact with us" 48 48 msgstr "" 49 49 50 #: random-image-block.php: 19250 #: random-image-block.php:240 51 51 msgid "Contact" 52 52 msgstr "" 53 53 54 #: random-image-block.php: 19354 #: random-image-block.php:241 55 55 msgid "If you like this plugin, please leave us a 5 star review on WordPress.org" 56 56 msgstr "" 57 57 58 #: random-image-block.php: 19458 #: random-image-block.php:242 59 59 msgid "Review" 60 60 msgstr "" 61 61 62 #: random-image-block.php: 19562 #: random-image-block.php:243 63 63 msgid "If you want to upgrade to pro version, please click on the button below" 64 64 msgstr "" 65 65 66 #: random-image-block.php:2 0066 #: random-image-block.php:248 67 67 msgid "My Account" 68 68 msgstr "" 69 69 70 #: random-image-block.php:2 0470 #: random-image-block.php:252 71 71 msgid "Upgrade to Pro" 72 72 msgstr "" 73 73 74 #: build/index.js:228 75 #: src/Inspector.js:27 76 #: build/index.js:169 74 #: build/index.js:1 75 #: src/Controls.js:31 76 msgid "Shuffle Image" 77 msgstr "" 78 79 #: build/index.js:1 80 #: src/helper/UpgradeMessage.js:7 81 msgid "Upgrade to Random Image Block Pro to use this feature. We have some features in mind and those will be added to pro version in the future InshAllah. Also you can suggest some too" 82 msgstr "" 83 84 #: build/index.js:1 85 #: src/helper/UpgradeMessage.js:9 86 msgid "Here" 87 msgstr "" 88 89 #: build/index.js:1 90 #: src/helper/UpgradeMessage.js:13 91 msgid "Upgrade Now" 92 msgstr "" 93 94 #: build/index.js:1 95 #: src/Inspector.js:32 77 96 msgid "Images" 78 97 msgstr "" 79 98 80 #: build/index.js:253 81 #: src/Inspector.js:53 82 #: build/index.js:195 99 #: build/index.js:1 100 #: src/Inspector.js:60 83 101 msgid "Edit Images" 84 102 msgstr "" 85 103 86 #: build/index.js:256 87 #: src/Inspector.js:57 88 #: build/index.js:199 104 #: build/index.js:1 105 #: src/Inspector.js:64 89 106 msgid "Open Gallery" 90 107 msgstr "" 91 108 92 #: build/index.js:265 93 #: src/Inspector.js:66 94 #: build/index.js:208 109 #: build/index.js:1 110 #: src/Inspector.js:73 95 111 msgid "Remove Image" 96 112 msgstr "" 97 113 98 #: build/index.js:278 99 #: src/Inspector.js:83 100 #: build/index.js:225 114 #: build/index.js:1 115 #: src/Inspector.js:90 101 116 msgid "Select Images" 102 117 msgstr "" 103 118 104 #: build/index.js:284 105 #: src/Inspector.js:95 106 #: build/index.js:237 119 #: build/index.js:1 120 #: src/Inspector.js:102 107 121 msgid "Image Setting" 108 122 msgstr "" 109 123 110 #: build/index.js:293 111 #: src/Inspector.js:114 112 #: build/index.js:256 124 #: build/index.js:1 125 #: src/Inspector.js:121 113 126 msgid "Image Object Fit" 114 127 msgstr "" 115 128 116 #: build/index.js:299 117 #: src/Inspector.js:118 118 #: build/index.js:260 129 #: build/index.js:1 130 #: src/Inspector.js:125 119 131 msgid "Fill" 120 132 msgstr "" 121 133 122 #: build/index.js:302 123 #: src/Inspector.js:119 124 #: build/index.js:261 134 #: build/index.js:1 135 #: src/Inspector.js:126 125 136 msgid "Contain" 126 137 msgstr "" 127 138 128 #: build/index.js:305 129 #: src/Inspector.js:120 130 #: build/index.js:262 139 #: build/index.js:1 140 #: src/Inspector.js:127 131 141 msgid "Cover" 132 142 msgstr "" 133 143 134 #: build/index.js:308 135 #: src/Inspector.js:121 136 #: build/index.js:263 144 #: build/index.js:1 145 #: src/Inspector.js:128 137 146 msgid "Scale Down" 138 147 msgstr "" 139 148 140 #: build/index.js:311 141 #: src/Inspector.js:122 142 #: build/index.js:264 149 #: build/index.js:1 150 #: src/Inspector.js:129 143 151 msgid "Initial" 144 152 msgstr "" 145 153 146 #: build/index.js:314 147 #: src/Inspector.js:123 148 #: build/index.js:265 154 #: build/index.js:1 155 #: src/Inspector.js:130 149 156 msgid "Inherit" 150 157 msgstr "" 151 158 152 #: build/index.js:321 153 #: src/Inspector.js:130 154 #: build/index.js:272 159 #: build/index.js:1 160 #: src/Inspector.js:139 161 msgid "Link Settings" 162 msgstr "" 163 164 #: build/index.js:1 165 #: src/Inspector.js:141 166 msgid "Link To" 167 msgstr "" 168 169 #: build/index.js:1 170 #: src/Inspector.js:144 171 #: src/Inspector.js:354 172 msgid "None" 173 msgstr "" 174 175 #: build/index.js:1 176 #: src/Inspector.js:145 177 msgid "Attachment Page" 178 msgstr "" 179 180 #: build/index.js:1 181 #: src/Inspector.js:146 182 #: src/Inspector.js:154 183 msgid "Custom URL" 184 msgstr "" 185 186 #: build/index.js:1 187 #: src/Inspector.js:163 188 msgid "Open in new tab" 189 msgstr "" 190 191 #: build/index.js:1 192 #: src/Inspector.js:169 193 msgid "Image Filters" 194 msgstr "" 195 196 #: build/index.js:1 197 #: src/Inspector.js:182 198 msgid "Grayscale" 199 msgstr "" 200 201 #: build/index.js:1 202 #: src/Inspector.js:192 203 #: src/Inspector.js:216 204 #: src/Inspector.js:240 205 #: src/Inspector.js:264 206 #: src/Inspector.js:288 207 #: src/Inspector.js:312 208 msgid "Reset" 209 msgstr "" 210 211 #: build/index.js:1 212 #: src/Inspector.js:206 213 msgid "Blur (px)" 214 msgstr "" 215 216 #: build/index.js:1 217 #: src/Inspector.js:230 218 msgid "Brightness (%)" 219 msgstr "" 220 221 #: build/index.js:1 222 #: src/Inspector.js:254 223 msgid "Contrast (%)" 224 msgstr "" 225 226 #: build/index.js:1 227 #: src/Inspector.js:278 228 msgid "Saturation (%)" 229 msgstr "" 230 231 #: build/index.js:1 232 #: src/Inspector.js:302 233 msgid "Hue Rotate (deg)" 234 msgstr "" 235 236 #: build/index.js:1 237 #: src/Inspector.js:325 238 msgid "Shuffle Settings" 239 msgstr "" 240 241 #: build/index.js:1 242 #: src/Inspector.js:335 243 msgid "Auto-refresh" 244 msgstr "" 245 246 #: build/index.js:1 247 #: src/Inspector.js:341 248 msgid "Refresh Interval (seconds)" 249 msgstr "" 250 251 #: build/index.js:1 252 #: src/Inspector.js:351 253 msgid "Shuffle Animation" 254 msgstr "" 255 256 #: build/index.js:1 257 #: src/Inspector.js:355 258 msgid "Fade" 259 msgstr "" 260 261 #: build/index.js:1 262 #: src/Inspector.js:356 263 msgid "Slide" 264 msgstr "" 265 266 #: build/index.js:1 267 #: src/Inspector.js:357 268 msgid "Zoom" 269 msgstr "" 270 271 #: build/index.js:1 272 #: src/Inspector.js:365 273 msgid "Animation Duration (ms)" 274 msgstr "" 275 276 #: build/index.js:1 277 #: src/Inspector.js:376 278 msgid "Sticky Mode" 279 msgstr "" 280 281 #: build/index.js:1 282 #: src/Inspector.js:377 283 msgid "Keep same random image for session duration using local storage." 284 msgstr "" 285 286 #: build/index.js:1 287 #: src/Inspector.js:385 155 288 msgid "Caption Setting" 156 289 msgstr "" 157 290 158 #: build/index.js:330 159 #: src/Inspector.js:138 160 #: build/index.js:280 291 #: build/index.js:1 292 #: src/Inspector.js:387 293 msgid "Image Text Alignment" 294 msgstr "" 295 296 #: build/index.js:1 297 #: src/Inspector.js:395 161 298 msgid "Left" 162 299 msgstr "" 163 300 164 #: build/index.js:336 165 #: src/Inspector.js:145 166 #: build/index.js:287 301 #: build/index.js:1 302 #: src/Inspector.js:396 167 303 msgid "Center" 168 304 msgstr "" 169 305 170 #: build/index.js:342 171 #: src/Inspector.js:152 172 #: build/index.js:294 306 #: build/index.js:1 307 #: src/Inspector.js:397 173 308 msgid "Right" 174 309 msgstr "" 175 310 176 #: build/index.js:343 177 #: src/Inspector.js:156 178 #: build/index.js:298 311 #: build/index.js:1 312 #: src/Inspector.js:400 179 313 msgid "Show Caption On" 180 314 msgstr "" 181 315 182 #: build/index.js:346 183 #: src/Inspector.js:159 184 #: build/index.js:301 316 #: build/index.js:1 317 #: src/Inspector.js:403 185 318 msgid "Default" 186 319 msgstr "" 187 320 188 #: build/index.js:349 189 #: src/Inspector.js:160 190 #: build/index.js:302 321 #: build/index.js:1 322 #: src/Inspector.js:404 191 323 msgid "Hover" 192 324 msgstr "" 193 325 194 #: build/index.js:359 195 #: src/Inspector.js:174 196 #: build/index.js:316 326 #: build/index.js:1 327 #: src/Inspector.js:420 197 328 msgid "Caption Over Image?" 198 329 msgstr "" 199 330 200 #: build/index.js:362 201 #: src/Inspector.js:177 202 #: build/index.js:319 331 #: build/index.js:1 332 #: src/Inspector.js:423 203 333 msgid "No" 204 334 msgstr "" 205 335 206 #: build/index.js:365 207 #: src/Inspector.js:178 208 #: build/index.js:320 336 #: build/index.js:1 337 #: src/Inspector.js:424 209 338 msgid "Yes" 210 339 msgstr "" 211 212 #: build/index.js:485213 #: src/helper/UpgradeMessage.js:7214 #: build/index.js:409215 msgid "Upgrade to Random Image Block Pro to use this feature. We have some features in mind and those will be added to pro version in the future InshAllah. Also you can suggest some too"216 msgstr ""217 218 #: build/index.js:488219 #: src/helper/UpgradeMessage.js:9220 #: build/index.js:411221 msgid "Here"222 msgstr ""223 224 #: build/index.js:492225 #: src/helper/UpgradeMessage.js:13226 #: build/index.js:415227 msgid "Upgrade Now"228 msgstr "" -
random-image-block-for-block-editor/tags/1.1.0/random-image-block.php
r3449156 r3461135 5 5 * Requires at least: 5.8 6 6 * Requires PHP: 7.0 7 * Version: 1. 0.57 * Version: 1.1.0 8 8 * Author: ultraDevs 9 9 * Author URI: https://ultradevs.com … … 121 121 [ 'ud-random-img-block-pro' => udrib_fs()->is_plan( 'pro' ) ], 122 122 [ 123 'ud-random-img-block-caption-on-hover' => $attributes['captionStyle']['showCaptionOn']&& 'hover' === $attributes['captionStyle']['showCaptionOn']123 'ud-random-img-block-caption-on-hover' => isset( $attributes['captionStyle']['showCaptionOn'] ) && 'hover' === $attributes['captionStyle']['showCaptionOn'] 124 124 ], 125 125 [ 126 'ud-radmon-img-block-caption-over-img' => $attributes['captionStyle']['captionOverlay']["enabled"]&& 'yes' === $attributes['captionStyle']['captionOverlay']["enabled"]126 'ud-radmon-img-block-caption-over-img' => isset( $attributes['captionStyle']['captionOverlay']["enabled"] ) && 'yes' === $attributes['captionStyle']['captionOverlay']["enabled"] 127 127 ] 128 128 ), 129 'style' => '--ud-rib-overlay-position-x:' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['x'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['x'] * 100 ) . '%' : '50%' ) . '; --ud-rib-overlay-position-y:' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['y'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['y'] * 100 ) . '%' : '50%' ) . ';--ud-rib-overlay-position-t-x:-' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['x'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['x'] * 100 ) . '%' : '50%' ) . '; --ud-rib-overlay-position-t-y:-' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['y'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['y'] * 100 ) . '%' : '50%' ) . ';' 129 'style' => '--ud-rib-overlay-position-x:' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['x'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['x'] * 100 ) . '%' : '50%' ) . '; --ud-rib-overlay-position-y:' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['y'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['y'] * 100 ) . '%' : '50%' ) . ';--ud-rib-overlay-position-t-x:-' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['x'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['x'] * 100 ) . '%' : '50%' ) . '; --ud-rib-overlay-position-t-y:-' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['y'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['y'] * 100 ) . '%' : '50%' ) . ';', 130 'data-images' => wp_json_encode( $attributes['images'] ), 131 'data-anim-enabled' => ( isset( $attributes['shuffleAnimation'] ) && 'none' !== $attributes['shuffleAnimation'] ) ? 'yes' : 'no', 132 'data-anim-type' => isset( $attributes['shuffleAnimation'] ) ? $attributes['shuffleAnimation'] : 'none', 133 'data-anim-duration' => isset( $attributes['animationDuration'] ) ? $attributes['animationDuration'] : 500, 134 'data-auto-refresh-enabled' => ( isset( $attributes['autoRefresh'] ) && $attributes['autoRefresh'] ) ? 'true' : 'false', 135 'data-auto-refresh-interval'=> isset( $attributes['refreshInterval'] ) ? $attributes['refreshInterval'] : 5, 136 'data-current-index' => isset( $index ) ? $index : 0, 137 'data-link-enabled' => isset( $attributes['linkSettings']['enabled'] ) ? $attributes['linkSettings']['enabled'] : 'none', 138 'data-sticky-mode' => ( isset( $attributes['stickyMode'] ) && $attributes['stickyMode'] ) ? 'yes' : 'no', 139 'data-unique-id' => isset( $attributes['uniqueId'] ) ? $attributes['uniqueId'] : '', 130 140 ]); 131 141 … … 137 147 138 148 $count = count( $images ); 139 $index = ( $count > 1 ) ? wp_rand( 0, $count - 1 ) : 0; 149 150 // Check if rendering in editor (via REST API for ServerSideRender). 151 $is_editor_preview = defined( 'REST_REQUEST' ) && REST_REQUEST; 152 153 // Use stored index only in editor for consistency, always random on frontend. 154 if ( $is_editor_preview && isset( $attributes['selectedImageIndex'] ) && $attributes['selectedImageIndex'] >= 0 && $attributes['selectedImageIndex'] < $count ) { 155 $index = $attributes['selectedImageIndex']; 156 } else { 157 // Frontend always shows random image. 158 $index = ( $count > 1 ) ? wp_rand( 0, $count - 1 ) : 0; 159 } 160 140 161 $content = ( new UDRIB_Generate_CSS( $attributes ) )->css_output(); 141 162 $content .= '<div '. $wrapper_attributes .'>'; -
random-image-block-for-block-editor/tags/1.1.0/readme.txt
r3449156 r3461135 1 1 === Random Image Block for Block Editor === 2 2 Contributors: mhimon, ultradevs 3 Tags: random image block, random image, image block, block, gutenberg , gutenberg block3 Tags: random image block, random image, image block, block, gutenberg 4 4 Tested up to: 6.9 5 Stable tag: 1. 0.55 Stable tag: 1.1.0 6 6 License: GPL-2.0-or-later 7 7 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 19 19 * Compatible with desktop devices. 20 20 * Easy-to-use Gutenberg block interface. 21 21 * **Link Options** (Attachment page, Custom URL). 22 22 23 23 ## Features (Pro Version) … … 26 26 * Enhanced customization options for advanced users. 27 27 * **Caption Over Image** 28 * **Image Shuffle Animations** (Fade, Slide, Zoom). 29 * **Auto-refresh Interval** functionality. 30 * **Sticky Mode** (Random Seed persistence via local storage). 31 * **Image Filters** (Grayscale, Blur, Brightness, etc.). 28 32 * Priority support. 29 33 … … 47 51 48 52 == Changelog == 53 54 = 1.1.0 - 14 Feb 2026 = 55 * Added: Image Shuffle Animations (Fade, Slide, Zoom). 56 * Added: Auto-refresh Interval functionality. 57 * Added: Sticky Mode (Random Seed persistence via local storage). 58 * Added: Image Filters (Grayscale, Blur, Brightness, Contrast, Saturation, Hue Rotate). 59 * Added: Link Options (Attachment page, Custom URL). 49 60 50 61 = 1.0.5 - 18 Jan 2025 = -
random-image-block-for-block-editor/trunk/.distignore
r3449156 r3461135 35 35 *.spec.js 36 36 coverage 37 38 .wordpress-org/banner-772x250.html 39 .wordpress-org/banner-1544x500.html 40 .wordpress-org/README.md -
random-image-block-for-block-editor/trunk/FEATURES.md
r3449156 r3461135 8 8 9 9 ### 1. Link Options 10 - [ ] Link to attachment page11 - [ ] Link to custom URL10 - [x] Link to attachment page 11 - [x] Link to custom URL 12 12 - [ ] Lightbox/Modal integration 13 - [ ] Open in new tab option13 - [x] Open in new tab option 14 14 15 15 ### 2. Image Shuffle Animation 16 - [ ] Fade transition17 - [ ] Slide transition18 - [ ] Zoom transition19 - [ ] Transition duration control16 - [x] Fade transition 17 - [x] Slide transition 18 - [x] Zoom transition 19 - [x] Transition duration control 20 20 21 21 ### 3. Auto-refresh Interval 22 - [ ] Auto-rotate images every X seconds23 - [ ] Enable/disable toggle24 - [ ] Custom time interval (seconds)22 - [x] Auto-rotate images every X seconds 23 - [x] Enable/disable toggle 24 - [x] Custom time interval (seconds) 25 25 26 26 ### 4. Image Filters (CSS) 27 - [ ] Grayscale28 - [ ] Blur29 - [ ] Brightness30 - [ ] Contrast31 - [ ] Saturation32 - [ ] Hue Rotate27 - [x] Grayscale 28 - [x] Blur 29 - [x] Brightness 30 - [x] Contrast 31 - [x] Saturation 32 - [x] Hue Rotate 33 33 34 34 ### 5. Random Seed/Sticky Mode 35 - [ ] Keep same random image for session duration36 - [ ] Cookie-based persistence37 - [ ] Local storage option35 - [x] Keep same random image for session duration 36 - [x] Cookie-based persistence (using Local Storage) 37 - [x] Local storage option 38 38 39 39 --- -
random-image-block-for-block-editor/trunk/build/block.json
r3449156 r3461135 47 47 "type": "array", 48 48 "default": [] 49 }, 50 "selectedImageIndex": { 51 "type": "number", 52 "default": 0 49 53 }, 50 54 "imageAlign": { … … 122 126 "openInNewTab": false 123 127 } 128 }, 129 "filterSettings": { 130 "type": "object", 131 "default": { 132 "grayscale": 0, 133 "blur": 0, 134 "brightness": 100, 135 "contrast": 100, 136 "saturate": 100, 137 "hueRotate": 0 138 } 139 }, 140 "autoRefresh": { 141 "type": "boolean", 142 "default": false 143 }, 144 "refreshInterval": { 145 "type": "number", 146 "default": 5 147 }, 148 "shuffleAnimation": { 149 "type": "string", 150 "default": "fade" 151 }, 152 "animationDuration": { 153 "type": "number", 154 "default": 500 155 }, 156 "stickyMode": { 157 "type": "boolean", 158 "default": false 159 }, 160 "uniqueId": { 161 "type": "string", 162 "default": "" 124 163 } 125 164 }, … … 127 166 "editorScript": "file:./index.js", 128 167 "editorStyle": "file:./index.css", 129 "style": "file:./style-index.css" 168 "style": "file:./style-index.css", 169 "viewScript": "file:./frontend.js" 130 170 } -
random-image-block-for-block-editor/trunk/build/index.asset.php
r3449156 r3461135 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => ' dd9bc390fd6f5685dae6');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '512cd438f6840c0b4013'); -
random-image-block-for-block-editor/trunk/build/index.js
r3449156 r3461135 1 (()=>{"use strict";var e,t={411(e,t,a){const l=window.wp.blocks,o=window.wp.i18n,n=JSON.parse('{"DD":"Random Image Block","L1":"widgets","Kk":"image-flip-horizontal","h_":"Display random images from a gallery.","uK":{"images":{"type":"array","default":[]}," imageAlign":{"type":"string","default":"center"},"imageObjectFit":{"type":"string","default":""},"captionStyle":{"type":"object","default":{"color":"#ffffff","fontSize":16,"fontSizeUnit":"px","showCaptionOn":"","captionOverlay":{"enabled":"no","position":{"x":0.5,"y":0.5}},"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"imageSize":{"type":"object","default":{"desktop":{"width":100,"widthUnit":"%","height":100,"heightUnit":"%"},"tablet":{"width":"","widthUnit":"%","height":"","heightUnit":"%"},"mobile":{"width":"","widthUnit":"%","height":"","heightUnit":"%"}}},"linkSettings":{"type":"object","default":{"enabled":"none","customUrl":"","openInNewTab":false}}}}'),i=window.wp.element,r=window.wp.blockEditor,m=window.wp.serverSideRender;var c=a.n(m);const d=window.wp.components,g=({attributes:e,setAttributes:t})=>{const{images:a}=e;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(r.BlockControls,null,(0,i.createElement)(d.ToolbarGroup,null,(0,i.createElement)(r.MediaUploadCheck,null,(0,i.createElement)(r.MediaUpload,{multiple:!0,gallery:!0,addToGallery:!0,allowedTypes:["image"],value:a.map(e=>e.id),onSelect:e=>{const a=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption}));t({images:a})},render:({open:e})=>(0,i.createElement)(d.ToolbarButton,{label:(0,o.__)("Edit Images","random-image-block"),icon:"edit",onClick:e})})))))},b=()=>(0,i.createElement)("div",{className:"ud-upgrade"},(0,i.createElement)("p",null,(0,o.__)("Upgrade to Random Image Block Pro to use this feature. We have some features in mind and those will be added to pro version in the future InshAllah. Also you can suggest some too","random-image-block-for-block-editor")," "," ",(0,i.createElement)("a",{href:"https://ultradevs.com/contact-us/",target:"_blank"},(0,o.__)("Here","random-image-block-for-block-editor"))),(0,i.createElement)("a",{href:ultraDevsRandomImageBlock.upgradeLink,target:"_blank",rel:"noreferrer"},(0,o.__)("Upgrade Now","random-image-block-for-block-editor"))),s=({imageSizes:e,onChange:t})=>(0,i.createElement)("div",{className:"udb-image-size"},(0,i.createElement)(d.TabPanel,{className:"udb-image-size__tabs",activeClass:"active-tab",tabs:[{name:"desktop",title:"Desktop",className:"desktop-tab"},{name:"tablet",title:"Tablet",className:"tablet-tab"},{name:"mobile",title:"Mobile",className:"mobile-tab"}]},a=>"mobile"!==a.name&&"tablet"!==a.name||ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,i.createElement)("div",{className:"udb-image-size__tabs__content"},(0,i.createElement)("div",{className:"udb-image-size__tabs__content__width"},(0,i.createElement)("label",{htmlFor:"width"},"Width:"),(0,i.createElement)("input",{type:"number",id:"width",value:e[a.name].width,onChange:l=>t({...e,[a.name]:{...e[a.name],width:Number(l.target.value)}})}),(0,i.createElement)("select",{value:e[a.name].widthUnit,onChange:l=>t({...e,[a.name]:{...e[a.name],widthUnit:l.target.value}})},(0,i.createElement)("option",{value:"%"},"%"),(0,i.createElement)("option",{value:"px"},"px"),(0,i.createElement)("option",{value:"em"},"em"),(0,i.createElement)("option",{value:"rem"},"rem"),(0,i.createElement)("option",{value:"vw"},"vw"))),(0,i.createElement)("div",{className:"udb-image-size__tabs__content__height"},(0,i.createElement)("label",{htmlFor:"height"},"Height:"),(0,i.createElement)("input",{type:"number",id:"height",value:e[a.name].height,onChange:l=>t({...e,[a.name]:{...e[a.name],height:Number(l.target.value)}})}),(0,i.createElement)("select",{value:e[a.name].heightUnit,onChange:l=>t({...e,[a.name]:{...e[a.name],heightUnit:l.target.value}})},(0,i.createElement)("option",{value:"%"},"%"),(0,i.createElement)("option",{value:"px"},"px"),(0,i.createElement)("option",{value:"em"},"em"),(0,i.createElement)("option",{value:"rem"},"rem"),(0,i.createElement)("option",{value:"vh"},"vh")))):(0,i.createElement)(b,null))),u=e=>{const{attributes:t,setAttributes:a}=e,{images:l,imageSize:n,imageAlign:m,imageObjectFit:c,captionStyle:g,linkSettings:u}=t;return(0,i.createElement)(r.InspectorControls,null,(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Images","random-image-block-for-block-editor")},(0,i.createElement)(r.MediaUploadCheck,null,(0,i.createElement)(r.MediaUpload,{multiple:!0,gallery:!0,addToGallery:!0,allowedTypes:["image"],value:l.map(e=>e.id),onSelect:e=>{const t=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption}));a({images:t})},render:({open:e})=>(0,i.createElement)(i.Fragment,null,l?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.Button,{label:(0,o.__)("Edit Images","random-image-block-for-block-editor"),icon:"edit",onClick:e},(0,o.__)("Open Gallery","random-image-block-for-block-editor")),(0,i.createElement)("div",{className:"random-image-block__images"},l.map(e=>(0,i.createElement)("div",{className:"random-image-block__images__image",key:e.id},(0,i.createElement)("div",{className:"random-image-block__images__image__action"},(0,i.createElement)(d.Button,{label:(0,o.__)("Remove Image","random-image-block-for-block-editor"),icon:"trash",onClick:()=>{const t=l.filter(t=>t.id!==e.id);a({images:t})}})),(0,i.createElement)("img",{src:e.url,alt:e.alt}))))):(0,i.createElement)(d.Button,{label:(0,o.__)("Select Images","random-image-block-for-block-editor"),icon:"edit",onClick:e}))}))),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Image Setting","random-image-block-for-block-editor")},(0,i.createElement)(s,{imageSizes:n,onChange:e=>{a({imageSize:e})}}),ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Image Object Fit","random-image-block-for-block-editor"),value:c,options:[{label:(0,o.__)("","random-image-block-for-block-editor"),value:""},{label:(0,o.__)("Fill","random-image-block-for-block-editor"),value:"fill"},{label:(0,o.__)("Contain","random-image-block-for-block-editor"),value:"contain"},{label:(0,o.__)("Cover","random-image-block-for-block-editor"),value:"cover"},{label:(0,o.__)("Scale Down","random-image-block-for-block-editor"),value:"scale-down"},{label:(0,o.__)("Initial","random-image-block-for-block-editor"),value:"initial"},{label:(0,o.__)("Inherit","random-image-block-for-block-editor"),value:"inherit"}],onChange:e=>a({imageObjectFit:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("p",null,"Image Object Fit"),(0,i.createElement)(b,null))),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Link Settings","random-image-block-for-block-editor")},(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Link To","random-image-block-for-block-editor"),value:u.enabled,options:[{label:(0,o.__)("None","random-image-block-for-block-editor"),value:"none"},{label:(0,o.__)("Attachment Page","random-image-block-for-block-editor"),value:"attachment"},{label:(0,o.__)("Custom URL","random-image-block-for-block-editor"),value:"custom"}],onChange:e=>a({linkSettings:{...u,enabled:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"custom"===u.enabled&&(0,i.createElement)(d.TextControl,{label:(0,o.__)("Custom URL","random-image-block-for-block-editor"),value:u.customUrl,onChange:e=>a({linkSettings:{...u,customUrl:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"none"!==u.enabled&&(0,i.createElement)(d.ToggleControl,{label:(0,o.__)("Open in new tab","random-image-block-for-block-editor"),checked:u.openInNewTab,onChange:e=>a({linkSettings:{...u,openInNewTab:e}})})),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Caption Setting","random-image-block-for-block-editor")},(0,i.createElement)(d.__experimentalToggleGroupControl,{label:(0,o.__)("Image Text Alignment","random-image-block-for-block-editor"),className:"random-image-block__alignment",value:m,onChange:e=>a({imageAlign:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0},(0,i.createElement)(d.__experimentalToggleGroupControlOption,{value:"left",label:(0,o.__)("Left","random-image-block-for-block-editor")}),(0,i.createElement)(d.__experimentalToggleGroupControlOption,{value:"center",label:(0,o.__)("Center","random-image-block-for-block-editor")}),(0,i.createElement)(d.__experimentalToggleGroupControlOption,{value:"right",label:(0,o.__)("Right","random-image-block-for-block-editor")})),(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Show Caption On","random-image-block-for-block-editor"),value:g.showCaptionOn,options:[{label:(0,o.__)("Default","random-image-block-for-block-editor"),value:""},{label:(0,o.__)("Hover","random-image-block-for-block-editor"),value:"hover"}],onChange:e=>a({captionStyle:{...g,showCaptionOn:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Caption Over Image?","random-image-block-for-block-editor"),value:g.captionOverlay.enabled,options:[{label:(0,o.__)("No","random-image-block-for-block-editor"),value:"no"},{label:(0,o.__)("Yes","random-image-block-for-block-editor"),value:"yes"}],onChange:e=>a({captionStyle:{...g,captionOverlay:{...g.captionOverlay,enabled:e}}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"yes"===g.captionOverlay.enabled&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.FocalPointPicker,{url:l[0]?.url,value:g.captionOverlay.position,onChange:e=>a({captionStyle:{...g,captionOverlay:{...g.captionOverlay,position:e}}})}))):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("p",null,"Caption Over Image?"),(0,i.createElement)(b,null))))};(0,l.registerBlockType)("ultradevs/random-image-block",{title:n.DD,description:n.h_,attributes:n.uK,icon:n.Kk,category:n.L1,keywords:[(0,o.__)("random image","random-image-block"),(0,o.__)("image","random-image-block"),(0,o.__)("random","random-image-block")],edit:function(e){const{attributes:t,setAttributes:a}=e,{images:l}=t;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(g,{attributes:t,setAttributes:a}),(0,i.createElement)(u,{attributes:t,setAttributes:a}),(0,i.createElement)("div",(0,r.useBlockProps)(),l.length?(0,i.createElement)(c(),{block:"ultradevs/random-image-block",attributes:t}):(0,i.createElement)(r.MediaPlaceholder,{multiple:!0,gallery:!0,icon:(0,i.createElement)(r.BlockIcon,{icon:"format-gallery"}),allowedTypes:["image"],labels:{title:(0,o.__)("Random Image","random-image-block"),instructions:(0,o.__)("Select Images","random-image-block")},onSelect:e=>{const t=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption}));a({images:t})}})))},save:()=>null})}},a={};function l(e){var o=a[e];if(void 0!==o)return o.exports;var n=a[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=(t,a,o,n)=>{if(!a){var i=1/0;for(d=0;d<e.length;d++){for(var[a,o,n]=e[d],r=!0,m=0;m<a.length;m++)(!1&n||i>=n)&&Object.keys(l.O).every(e=>l.O[e](a[m]))?a.splice(m--,1):(r=!1,n<i&&(i=n));if(r){e.splice(d--,1);var c=o();void 0!==c&&(t=c)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[a,o,n]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};l.O.j=t=>0===e[t];var t=(t,a)=>{var o,n,[i,r,m]=a,c=0;if(i.some(t=>0!==e[t])){for(o in r)l.o(r,o)&&(l.m[o]=r[o]);if(m)var d=m(l)}for(t&&t(a);c<i.length;c++)n=i[c],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return l.O(d)},a=globalThis.webpackChunkrandom_image_block=globalThis.webpackChunkrandom_image_block||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var o=l.O(void 0,[350],()=>l(411));o=l.O(o)})();1 (()=>{"use strict";var e,t={411(e,t,a){const l=window.wp.blocks,o=window.wp.i18n,n=JSON.parse('{"DD":"Random Image Block","L1":"widgets","Kk":"image-flip-horizontal","h_":"Display random images from a gallery.","uK":{"images":{"type":"array","default":[]},"selectedImageIndex":{"type":"number","default":0},"imageAlign":{"type":"string","default":"center"},"imageObjectFit":{"type":"string","default":""},"captionStyle":{"type":"object","default":{"color":"#ffffff","fontSize":16,"fontSizeUnit":"px","showCaptionOn":"","captionOverlay":{"enabled":"no","position":{"x":0.5,"y":0.5}},"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"imageSize":{"type":"object","default":{"desktop":{"width":100,"widthUnit":"%","height":100,"heightUnit":"%"},"tablet":{"width":"","widthUnit":"%","height":"","heightUnit":"%"},"mobile":{"width":"","widthUnit":"%","height":"","heightUnit":"%"}}},"linkSettings":{"type":"object","default":{"enabled":"none","customUrl":"","openInNewTab":false}},"filterSettings":{"type":"object","default":{"grayscale":0,"blur":0,"brightness":100,"contrast":100,"saturate":100,"hueRotate":0}},"autoRefresh":{"type":"boolean","default":false},"refreshInterval":{"type":"number","default":5},"shuffleAnimation":{"type":"string","default":"fade"},"animationDuration":{"type":"number","default":500},"stickyMode":{"type":"boolean","default":false},"uniqueId":{"type":"string","default":""}}}'),r=window.wp.element,i=window.wp.blockEditor,m=window.wp.serverSideRender;var c=a.n(m);const g=window.wp.components,d=({attributes:e,setAttributes:t})=>{const{images:a,selectedImageIndex:l}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(g.ToolbarGroup,null,a.length>1&&(0,r.createElement)(g.ToolbarButton,{label:(0,o.__)("Shuffle Image","random-image-block-for-block-editor"),icon:"randomize",onClick:()=>{if(a.length>1){let e;do{e=Math.floor(Math.random()*a.length)}while(e===l);t({selectedImageIndex:e})}}}),(0,r.createElement)(i.MediaUploadCheck,null,(0,r.createElement)(i.MediaUpload,{multiple:!0,gallery:!0,addToGallery:!0,allowedTypes:["image"],value:a.map(e=>e.id),onSelect:e=>{const a=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption}));t({images:a})},render:({open:e})=>(0,r.createElement)(g.ToolbarButton,{label:(0,o.__)("Edit Images","random-image-block"),icon:"edit",onClick:e})})))))},s=()=>(0,r.createElement)("div",{className:"ud-upgrade"},(0,r.createElement)("p",null,(0,o.__)("Upgrade to Random Image Block Pro to use this feature. We have some features in mind and those will be added to pro version in the future InshAllah. Also you can suggest some too","random-image-block-for-block-editor")," "," ",(0,r.createElement)("a",{href:"https://ultradevs.com/contact-us/",target:"_blank"},(0,o.__)("Here","random-image-block-for-block-editor"))),(0,r.createElement)("a",{href:ultraDevsRandomImageBlock.upgradeLink,target:"_blank",rel:"noreferrer"},(0,o.__)("Upgrade Now","random-image-block-for-block-editor"))),b=({imageSizes:e,onChange:t})=>(0,r.createElement)("div",{className:"udb-image-size"},(0,r.createElement)(g.TabPanel,{className:"udb-image-size__tabs",activeClass:"active-tab",tabs:[{name:"desktop",title:"Desktop",className:"desktop-tab"},{name:"tablet",title:"Tablet",className:"tablet-tab"},{name:"mobile",title:"Mobile",className:"mobile-tab"}]},a=>"mobile"!==a.name&&"tablet"!==a.name||ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)("div",{className:"udb-image-size__tabs__content"},(0,r.createElement)("div",{className:"udb-image-size__tabs__content__width"},(0,r.createElement)("label",{htmlFor:"width"},"Width:"),(0,r.createElement)("input",{type:"number",id:"width",value:e[a.name].width,onChange:l=>t({...e,[a.name]:{...e[a.name],width:Number(l.target.value)}})}),(0,r.createElement)("select",{value:e[a.name].widthUnit,onChange:l=>t({...e,[a.name]:{...e[a.name],widthUnit:l.target.value}})},(0,r.createElement)("option",{value:"%"},"%"),(0,r.createElement)("option",{value:"px"},"px"),(0,r.createElement)("option",{value:"em"},"em"),(0,r.createElement)("option",{value:"rem"},"rem"),(0,r.createElement)("option",{value:"vw"},"vw"))),(0,r.createElement)("div",{className:"udb-image-size__tabs__content__height"},(0,r.createElement)("label",{htmlFor:"height"},"Height:"),(0,r.createElement)("input",{type:"number",id:"height",value:e[a.name].height,onChange:l=>t({...e,[a.name]:{...e[a.name],height:Number(l.target.value)}})}),(0,r.createElement)("select",{value:e[a.name].heightUnit,onChange:l=>t({...e,[a.name]:{...e[a.name],heightUnit:l.target.value}})},(0,r.createElement)("option",{value:"%"},"%"),(0,r.createElement)("option",{value:"px"},"px"),(0,r.createElement)("option",{value:"em"},"em"),(0,r.createElement)("option",{value:"rem"},"rem"),(0,r.createElement)("option",{value:"vh"},"vh")))):(0,r.createElement)(s,null))),u=e=>{const{attributes:t,setAttributes:a}=e,{images:l,imageSize:n,imageAlign:m,imageObjectFit:c,captionStyle:d,linkSettings:u,filterSettings:_}=t;return(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Images","random-image-block-for-block-editor")},(0,r.createElement)(i.MediaUploadCheck,null,(0,r.createElement)(i.MediaUpload,{multiple:!0,gallery:!0,addToGallery:!0,allowedTypes:["image"],value:l.map(e=>e.id),onSelect:e=>{const t=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption,link:e.link})),l=e.length>1?Math.floor(Math.random()*e.length):0;a({images:t,selectedImageIndex:l})},render:({open:e})=>(0,r.createElement)(r.Fragment,null,l?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Edit Images","random-image-block-for-block-editor"),icon:"edit",onClick:e},(0,o.__)("Open Gallery","random-image-block-for-block-editor")),(0,r.createElement)("div",{className:"random-image-block__images"},l.map(e=>(0,r.createElement)("div",{className:"random-image-block__images__image",key:e.id},(0,r.createElement)("div",{className:"random-image-block__images__image__action"},(0,r.createElement)(g.Button,{label:(0,o.__)("Remove Image","random-image-block-for-block-editor"),icon:"trash",onClick:()=>{const t=l.filter(t=>t.id!==e.id);a({images:t})}})),(0,r.createElement)("img",{src:e.url,alt:e.alt}))))):(0,r.createElement)(g.Button,{label:(0,o.__)("Select Images","random-image-block-for-block-editor"),icon:"edit",onClick:e}))}))),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Image Setting","random-image-block-for-block-editor")},(0,r.createElement)(b,{imageSizes:n,onChange:e=>{a({imageSize:e})}}),ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Image Object Fit","random-image-block-for-block-editor"),value:c,options:[{label:(0,o.__)("","random-image-block-for-block-editor"),value:""},{label:(0,o.__)("Fill","random-image-block-for-block-editor"),value:"fill"},{label:(0,o.__)("Contain","random-image-block-for-block-editor"),value:"contain"},{label:(0,o.__)("Cover","random-image-block-for-block-editor"),value:"cover"},{label:(0,o.__)("Scale Down","random-image-block-for-block-editor"),value:"scale-down"},{label:(0,o.__)("Initial","random-image-block-for-block-editor"),value:"initial"},{label:(0,o.__)("Inherit","random-image-block-for-block-editor"),value:"inherit"}],onChange:e=>a({imageObjectFit:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,"Image Object Fit"),(0,r.createElement)(s,null))),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Link Settings","random-image-block-for-block-editor")},(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Link To","random-image-block-for-block-editor"),value:u.enabled,options:[{label:(0,o.__)("None","random-image-block-for-block-editor"),value:"none"},{label:(0,o.__)("Attachment Page","random-image-block-for-block-editor"),value:"attachment"},{label:(0,o.__)("Custom URL","random-image-block-for-block-editor"),value:"custom"}],onChange:e=>a({linkSettings:{...u,enabled:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"custom"===u.enabled&&(0,r.createElement)(g.TextControl,{label:(0,o.__)("Custom URL","random-image-block-for-block-editor"),value:u.customUrl,onChange:e=>a({linkSettings:{...u,customUrl:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"none"!==u.enabled&&(0,r.createElement)(g.ToggleControl,{label:(0,o.__)("Open in new tab","random-image-block-for-block-editor"),checked:u.openInNewTab,onChange:e=>a({linkSettings:{...u,openInNewTab:e}})})),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Image Filters","random-image-block-for-block-editor")},ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Grayscale","random-image-block-for-block-editor"),value:_.grayscale,onChange:e=>a({filterSettings:{..._,grayscale:e}}),min:0,max:100,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,grayscale:0}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Blur (px)","random-image-block-for-block-editor"),value:_.blur,onChange:e=>a({filterSettings:{..._,blur:e}}),min:0,max:20,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,blur:0}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Brightness (%)","random-image-block-for-block-editor"),value:_.brightness,onChange:e=>a({filterSettings:{..._,brightness:e}}),min:0,max:200,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,brightness:100}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Contrast (%)","random-image-block-for-block-editor"),value:_.contrast,onChange:e=>a({filterSettings:{..._,contrast:e}}),min:0,max:200,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,contrast:100}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Saturation (%)","random-image-block-for-block-editor"),value:_.saturate,onChange:e=>a({filterSettings:{..._,saturate:e}}),min:0,max:200,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,saturate:100}}),style:{marginTop:"24px"}}))),(0,r.createElement)(g.Flex,{align:"start",gap:"0"},(0,r.createElement)(g.FlexItem,{style:{flex:1}},(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Hue Rotate (deg)","random-image-block-for-block-editor"),value:_.hueRotate,onChange:e=>a({filterSettings:{..._,hueRotate:e}}),min:0,max:360,__next40pxDefaultSize:!0})),(0,r.createElement)(g.FlexItem,null,(0,r.createElement)(g.Button,{label:(0,o.__)("Reset","random-image-block-for-block-editor"),icon:"redo",isSmall:!0,isSecondary:!0,onClick:()=>a({filterSettings:{..._,hueRotate:0}}),style:{marginTop:"24px"}})))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,"Image Object Fit"),(0,r.createElement)(s,null))),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Shuffle Settings","random-image-block-for-block-editor")},ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.ToggleControl,{label:(0,o.__)("Auto-refresh","random-image-block-for-block-editor"),checked:t.autoRefresh,onChange:e=>a({autoRefresh:e})}),t.autoRefresh&&(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Refresh Interval (seconds)","random-image-block-for-block-editor"),value:t.refreshInterval,onChange:e=>a({refreshInterval:e}),min:1,max:60,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Shuffle Animation","random-image-block-for-block-editor"),value:t.shuffleAnimation,options:[{label:(0,o.__)("None","random-image-block-for-block-editor"),value:"none"},{label:(0,o.__)("Fade","random-image-block-for-block-editor"),value:"fade"},{label:(0,o.__)("Slide","random-image-block-for-block-editor"),value:"slide"},{label:(0,o.__)("Zoom","random-image-block-for-block-editor"),value:"zoom"}],onChange:e=>a({shuffleAnimation:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"none"!==t.shuffleAnimation&&(0,r.createElement)(g.RangeControl,{label:(0,o.__)("Animation Duration (ms)","random-image-block-for-block-editor"),value:t.animationDuration,onChange:e=>a({animationDuration:e}),min:100,max:2e3,step:100,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,r.createElement)(g.ToggleControl,{label:(0,o.__)("Sticky Mode","random-image-block-for-block-editor"),help:(0,o.__)("Keep same random image for session duration using local storage.","random-image-block-for-block-editor"),checked:t.stickyMode,onChange:e=>a({stickyMode:e})})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,"Image Object Fit"),(0,r.createElement)(s,null))),(0,r.createElement)(g.PanelBody,{title:(0,o.__)("Caption Setting","random-image-block-for-block-editor")},(0,r.createElement)(g.__experimentalToggleGroupControl,{label:(0,o.__)("Image Text Alignment","random-image-block-for-block-editor"),className:"random-image-block__alignment",value:m,onChange:e=>a({imageAlign:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0},(0,r.createElement)(g.__experimentalToggleGroupControlOption,{value:"left",label:(0,o.__)("Left","random-image-block-for-block-editor")}),(0,r.createElement)(g.__experimentalToggleGroupControlOption,{value:"center",label:(0,o.__)("Center","random-image-block-for-block-editor")}),(0,r.createElement)(g.__experimentalToggleGroupControlOption,{value:"right",label:(0,o.__)("Right","random-image-block-for-block-editor")})),(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Show Caption On","random-image-block-for-block-editor"),value:d.showCaptionOn,options:[{label:(0,o.__)("Default","random-image-block-for-block-editor"),value:""},{label:(0,o.__)("Hover","random-image-block-for-block-editor"),value:"hover"}],onChange:e=>a({captionStyle:{...d,showCaptionOn:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),ultraDevsRandomImageBlock.licensing.is_plan_pro?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.SelectControl,{label:(0,o.__)("Caption Over Image?","random-image-block-for-block-editor"),value:d.captionOverlay.enabled,options:[{label:(0,o.__)("No","random-image-block-for-block-editor"),value:"no"},{label:(0,o.__)("Yes","random-image-block-for-block-editor"),value:"yes"}],onChange:e=>a({captionStyle:{...d,captionOverlay:{...d.captionOverlay,enabled:e}}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"yes"===d.captionOverlay.enabled&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(g.FocalPointPicker,{url:l[0]?.url,value:d.captionOverlay.position,onChange:e=>a({captionStyle:{...d,captionOverlay:{...d.captionOverlay,position:e}}})}))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,"Caption Over Image?"),(0,r.createElement)(s,null))))};(0,l.registerBlockType)("ultradevs/random-image-block",{title:n.DD,description:n.h_,attributes:n.uK,icon:n.Kk,category:n.L1,keywords:[(0,o.__)("random image","random-image-block"),(0,o.__)("image","random-image-block"),(0,o.__)("random","random-image-block")],edit:function(e){const{attributes:t,setAttributes:a}=e,{images:l,uniqueId:n}=t;return wp.element.useEffect(()=>{n||a({uniqueId:e.clientId})},[]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d,{attributes:t,setAttributes:a}),(0,r.createElement)(u,{attributes:t,setAttributes:a}),(0,r.createElement)("div",(0,i.useBlockProps)(),l.length?(0,r.createElement)(c(),{block:"ultradevs/random-image-block",attributes:t}):(0,r.createElement)(i.MediaPlaceholder,{multiple:!0,gallery:!0,icon:(0,r.createElement)(i.BlockIcon,{icon:"format-gallery"}),allowedTypes:["image"],labels:{title:(0,o.__)("Random Image","random-image-block"),instructions:(0,o.__)("Select Images","random-image-block")},onSelect:e=>{const t=e.map(e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption})),l=e.length>1?Math.floor(Math.random()*e.length):0;a({images:t,selectedImageIndex:l})}})))},save:()=>null})}},a={};function l(e){var o=a[e];if(void 0!==o)return o.exports;var n=a[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=(t,a,o,n)=>{if(!a){var r=1/0;for(g=0;g<e.length;g++){for(var[a,o,n]=e[g],i=!0,m=0;m<a.length;m++)(!1&n||r>=n)&&Object.keys(l.O).every(e=>l.O[e](a[m]))?a.splice(m--,1):(i=!1,n<r&&(r=n));if(i){e.splice(g--,1);var c=o();void 0!==c&&(t=c)}}return t}n=n||0;for(var g=e.length;g>0&&e[g-1][2]>n;g--)e[g]=e[g-1];e[g]=[a,o,n]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};l.O.j=t=>0===e[t];var t=(t,a)=>{var o,n,[r,i,m]=a,c=0;if(r.some(t=>0!==e[t])){for(o in i)l.o(i,o)&&(l.m[o]=i[o]);if(m)var g=m(l)}for(t&&t(a);c<r.length;c++)n=r[c],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return l.O(g)},a=globalThis.webpackChunkrandom_image_block=globalThis.webpackChunkrandom_image_block||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var o=l.O(void 0,[350],()=>l(411));o=l.O(o)})(); -
random-image-block-for-block-editor/trunk/build/style-index.css
r3449156 r3461135 1 .ud-random-img-block-pro.ud-radmon-img-block-caption-over-img .ud-random-img-block__content{left:var(--ud-rib-overlay-position-x,50%);position:absolute;top:var(--ud-rib-overlay-position-y,50%);transform:translate(var(--ud-rib-overlay-position-t-y,-50%),var(--ud-rib-overlay-position-t-x,-50%));z-index:999}.ud-random-img-block-caption-on-hover{transition:all .3s ease-in-out}.ud-random-img-block-caption-on-hover .ud-random-img-block__content-caption{opacity:0;transition:all .3s ease-in-out;visibility:hidden}.ud-random-img-block-caption-on-hover:hover .ud-random-img-block__content-caption{opacity:1;visibility:visible}.ud-random-img-block__images{ position:relative}.ud-random-img-block__images img{max-height:100%;max-width:100%}.ud-random-img-block__content figcaption{font-size:inherit;text-align:inherit!important}1 .ud-random-img-block-pro.ud-radmon-img-block-caption-over-img .ud-random-img-block__content{left:var(--ud-rib-overlay-position-x,50%);position:absolute;top:var(--ud-rib-overlay-position-y,50%);transform:translate(var(--ud-rib-overlay-position-t-y,-50%),var(--ud-rib-overlay-position-t-x,-50%));z-index:999}.ud-random-img-block-caption-on-hover{transition:all .3s ease-in-out}.ud-random-img-block-caption-on-hover .ud-random-img-block__content-caption{opacity:0;transition:all .3s ease-in-out;visibility:hidden}.ud-random-img-block-caption-on-hover:hover .ud-random-img-block__content-caption{opacity:1;visibility:visible}.ud-random-img-block__images{overflow:hidden;position:relative}.ud-random-img-block__images img{max-height:100%;max-width:100%;transition:all var(--ud-rib-anim-duration,.5s) ease-in-out}.ud-random-img-block.animating{pointer-events:none}.ud-random-img-block.animating-fade .ud-random-img-block__images img{opacity:0}.ud-random-img-block.animating-slide .ud-random-img-block__images img{opacity:1}.ud-random-img-block.animating-zoom .ud-random-img-block__images img{opacity:0;transform:scale(1.1)}.ud-random-img-block__content figcaption{font-size:inherit;text-align:inherit!important} -
random-image-block-for-block-editor/trunk/includes/class-generate-css.php
r2985580 r3461135 118 118 $css .= ! empty( $this->attributes['imageObjectFit'] ) ? 'object-fit: ' . $this->attributes['imageObjectFit'] . '; ' : ''; 119 119 120 // Add CSS filters. 121 if ( isset( $this->attributes['filterSettings'] ) ) { 122 $filters = array(); 123 124 if ( ! empty( $this->attributes['filterSettings']['grayscale'] ) && $this->attributes['filterSettings']['grayscale'] > 0 ) { 125 $filters[] = 'grayscale(' . $this->attributes['filterSettings']['grayscale'] . '%)'; 126 } 127 if ( ! empty( $this->attributes['filterSettings']['blur'] ) && $this->attributes['filterSettings']['blur'] > 0 ) { 128 $filters[] = 'blur(' . $this->attributes['filterSettings']['blur'] . 'px)'; 129 } 130 if ( isset( $this->attributes['filterSettings']['brightness'] ) && $this->attributes['filterSettings']['brightness'] != 100 ) { 131 $filters[] = 'brightness(' . $this->attributes['filterSettings']['brightness'] . '%)'; 132 } 133 if ( isset( $this->attributes['filterSettings']['contrast'] ) && $this->attributes['filterSettings']['contrast'] != 100 ) { 134 $filters[] = 'contrast(' . $this->attributes['filterSettings']['contrast'] . '%)'; 135 } 136 if ( isset( $this->attributes['filterSettings']['saturate'] ) && $this->attributes['filterSettings']['saturate'] != 100 ) { 137 $filters[] = 'saturate(' . $this->attributes['filterSettings']['saturate'] . '%)'; 138 } 139 if ( ! empty( $this->attributes['filterSettings']['hueRotate'] ) && $this->attributes['filterSettings']['hueRotate'] > 0 ) { 140 $filters[] = 'hue-rotate(' . $this->attributes['filterSettings']['hueRotate'] . 'deg)'; 141 } 142 143 if ( ! empty( $filters ) ) { 144 $css .= 'filter: ' . implode( ' ', $filters ) . '; '; 145 } 146 } 147 120 148 $css .= '}'; 121 149 -
random-image-block-for-block-editor/trunk/languages/random-image-block-for-block-editor.pot
r3224694 r3461135 1 # Copyright (C) 202 5ultraDevs1 # Copyright (C) 2026 ultraDevs 2 2 # This file is distributed under the GPL-2.0-or-later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Random Image Block for Block Editor 1. 0.4\n"5 "Project-Id-Version: Random Image Block for Block Editor 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/random-imaage-block\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-01-18T01:29:11+00:00\n"12 "POT-Creation-Date: 2026-02-14T00:48:28+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.10.0\n" 15 15 "X-Domain: random-image-block-for-block-editor\n" 16 16 … … 35 35 msgstr "" 36 36 37 #: random-image-block.php: 17138 #: random-image-block.php: 19037 #: random-image-block.php:219 38 #: random-image-block.php:238 39 39 msgid "Random Image Block Settings" 40 40 msgstr "" 41 41 42 #: random-image-block.php: 17242 #: random-image-block.php:220 43 43 msgid "Random Image Block" 44 44 msgstr "" 45 45 46 #: random-image-block.php: 19146 #: random-image-block.php:239 47 47 msgid "This plugin is developed by ultraDevs. If you need any help, please contact with us" 48 48 msgstr "" 49 49 50 #: random-image-block.php: 19250 #: random-image-block.php:240 51 51 msgid "Contact" 52 52 msgstr "" 53 53 54 #: random-image-block.php: 19354 #: random-image-block.php:241 55 55 msgid "If you like this plugin, please leave us a 5 star review on WordPress.org" 56 56 msgstr "" 57 57 58 #: random-image-block.php: 19458 #: random-image-block.php:242 59 59 msgid "Review" 60 60 msgstr "" 61 61 62 #: random-image-block.php: 19562 #: random-image-block.php:243 63 63 msgid "If you want to upgrade to pro version, please click on the button below" 64 64 msgstr "" 65 65 66 #: random-image-block.php:2 0066 #: random-image-block.php:248 67 67 msgid "My Account" 68 68 msgstr "" 69 69 70 #: random-image-block.php:2 0470 #: random-image-block.php:252 71 71 msgid "Upgrade to Pro" 72 72 msgstr "" 73 73 74 #: build/index.js:228 75 #: src/Inspector.js:27 76 #: build/index.js:169 74 #: build/index.js:1 75 #: src/Controls.js:31 76 msgid "Shuffle Image" 77 msgstr "" 78 79 #: build/index.js:1 80 #: src/helper/UpgradeMessage.js:7 81 msgid "Upgrade to Random Image Block Pro to use this feature. We have some features in mind and those will be added to pro version in the future InshAllah. Also you can suggest some too" 82 msgstr "" 83 84 #: build/index.js:1 85 #: src/helper/UpgradeMessage.js:9 86 msgid "Here" 87 msgstr "" 88 89 #: build/index.js:1 90 #: src/helper/UpgradeMessage.js:13 91 msgid "Upgrade Now" 92 msgstr "" 93 94 #: build/index.js:1 95 #: src/Inspector.js:32 77 96 msgid "Images" 78 97 msgstr "" 79 98 80 #: build/index.js:253 81 #: src/Inspector.js:53 82 #: build/index.js:195 99 #: build/index.js:1 100 #: src/Inspector.js:60 83 101 msgid "Edit Images" 84 102 msgstr "" 85 103 86 #: build/index.js:256 87 #: src/Inspector.js:57 88 #: build/index.js:199 104 #: build/index.js:1 105 #: src/Inspector.js:64 89 106 msgid "Open Gallery" 90 107 msgstr "" 91 108 92 #: build/index.js:265 93 #: src/Inspector.js:66 94 #: build/index.js:208 109 #: build/index.js:1 110 #: src/Inspector.js:73 95 111 msgid "Remove Image" 96 112 msgstr "" 97 113 98 #: build/index.js:278 99 #: src/Inspector.js:83 100 #: build/index.js:225 114 #: build/index.js:1 115 #: src/Inspector.js:90 101 116 msgid "Select Images" 102 117 msgstr "" 103 118 104 #: build/index.js:284 105 #: src/Inspector.js:95 106 #: build/index.js:237 119 #: build/index.js:1 120 #: src/Inspector.js:102 107 121 msgid "Image Setting" 108 122 msgstr "" 109 123 110 #: build/index.js:293 111 #: src/Inspector.js:114 112 #: build/index.js:256 124 #: build/index.js:1 125 #: src/Inspector.js:121 113 126 msgid "Image Object Fit" 114 127 msgstr "" 115 128 116 #: build/index.js:299 117 #: src/Inspector.js:118 118 #: build/index.js:260 129 #: build/index.js:1 130 #: src/Inspector.js:125 119 131 msgid "Fill" 120 132 msgstr "" 121 133 122 #: build/index.js:302 123 #: src/Inspector.js:119 124 #: build/index.js:261 134 #: build/index.js:1 135 #: src/Inspector.js:126 125 136 msgid "Contain" 126 137 msgstr "" 127 138 128 #: build/index.js:305 129 #: src/Inspector.js:120 130 #: build/index.js:262 139 #: build/index.js:1 140 #: src/Inspector.js:127 131 141 msgid "Cover" 132 142 msgstr "" 133 143 134 #: build/index.js:308 135 #: src/Inspector.js:121 136 #: build/index.js:263 144 #: build/index.js:1 145 #: src/Inspector.js:128 137 146 msgid "Scale Down" 138 147 msgstr "" 139 148 140 #: build/index.js:311 141 #: src/Inspector.js:122 142 #: build/index.js:264 149 #: build/index.js:1 150 #: src/Inspector.js:129 143 151 msgid "Initial" 144 152 msgstr "" 145 153 146 #: build/index.js:314 147 #: src/Inspector.js:123 148 #: build/index.js:265 154 #: build/index.js:1 155 #: src/Inspector.js:130 149 156 msgid "Inherit" 150 157 msgstr "" 151 158 152 #: build/index.js:321 153 #: src/Inspector.js:130 154 #: build/index.js:272 159 #: build/index.js:1 160 #: src/Inspector.js:139 161 msgid "Link Settings" 162 msgstr "" 163 164 #: build/index.js:1 165 #: src/Inspector.js:141 166 msgid "Link To" 167 msgstr "" 168 169 #: build/index.js:1 170 #: src/Inspector.js:144 171 #: src/Inspector.js:354 172 msgid "None" 173 msgstr "" 174 175 #: build/index.js:1 176 #: src/Inspector.js:145 177 msgid "Attachment Page" 178 msgstr "" 179 180 #: build/index.js:1 181 #: src/Inspector.js:146 182 #: src/Inspector.js:154 183 msgid "Custom URL" 184 msgstr "" 185 186 #: build/index.js:1 187 #: src/Inspector.js:163 188 msgid "Open in new tab" 189 msgstr "" 190 191 #: build/index.js:1 192 #: src/Inspector.js:169 193 msgid "Image Filters" 194 msgstr "" 195 196 #: build/index.js:1 197 #: src/Inspector.js:182 198 msgid "Grayscale" 199 msgstr "" 200 201 #: build/index.js:1 202 #: src/Inspector.js:192 203 #: src/Inspector.js:216 204 #: src/Inspector.js:240 205 #: src/Inspector.js:264 206 #: src/Inspector.js:288 207 #: src/Inspector.js:312 208 msgid "Reset" 209 msgstr "" 210 211 #: build/index.js:1 212 #: src/Inspector.js:206 213 msgid "Blur (px)" 214 msgstr "" 215 216 #: build/index.js:1 217 #: src/Inspector.js:230 218 msgid "Brightness (%)" 219 msgstr "" 220 221 #: build/index.js:1 222 #: src/Inspector.js:254 223 msgid "Contrast (%)" 224 msgstr "" 225 226 #: build/index.js:1 227 #: src/Inspector.js:278 228 msgid "Saturation (%)" 229 msgstr "" 230 231 #: build/index.js:1 232 #: src/Inspector.js:302 233 msgid "Hue Rotate (deg)" 234 msgstr "" 235 236 #: build/index.js:1 237 #: src/Inspector.js:325 238 msgid "Shuffle Settings" 239 msgstr "" 240 241 #: build/index.js:1 242 #: src/Inspector.js:335 243 msgid "Auto-refresh" 244 msgstr "" 245 246 #: build/index.js:1 247 #: src/Inspector.js:341 248 msgid "Refresh Interval (seconds)" 249 msgstr "" 250 251 #: build/index.js:1 252 #: src/Inspector.js:351 253 msgid "Shuffle Animation" 254 msgstr "" 255 256 #: build/index.js:1 257 #: src/Inspector.js:355 258 msgid "Fade" 259 msgstr "" 260 261 #: build/index.js:1 262 #: src/Inspector.js:356 263 msgid "Slide" 264 msgstr "" 265 266 #: build/index.js:1 267 #: src/Inspector.js:357 268 msgid "Zoom" 269 msgstr "" 270 271 #: build/index.js:1 272 #: src/Inspector.js:365 273 msgid "Animation Duration (ms)" 274 msgstr "" 275 276 #: build/index.js:1 277 #: src/Inspector.js:376 278 msgid "Sticky Mode" 279 msgstr "" 280 281 #: build/index.js:1 282 #: src/Inspector.js:377 283 msgid "Keep same random image for session duration using local storage." 284 msgstr "" 285 286 #: build/index.js:1 287 #: src/Inspector.js:385 155 288 msgid "Caption Setting" 156 289 msgstr "" 157 290 158 #: build/index.js:330 159 #: src/Inspector.js:138 160 #: build/index.js:280 291 #: build/index.js:1 292 #: src/Inspector.js:387 293 msgid "Image Text Alignment" 294 msgstr "" 295 296 #: build/index.js:1 297 #: src/Inspector.js:395 161 298 msgid "Left" 162 299 msgstr "" 163 300 164 #: build/index.js:336 165 #: src/Inspector.js:145 166 #: build/index.js:287 301 #: build/index.js:1 302 #: src/Inspector.js:396 167 303 msgid "Center" 168 304 msgstr "" 169 305 170 #: build/index.js:342 171 #: src/Inspector.js:152 172 #: build/index.js:294 306 #: build/index.js:1 307 #: src/Inspector.js:397 173 308 msgid "Right" 174 309 msgstr "" 175 310 176 #: build/index.js:343 177 #: src/Inspector.js:156 178 #: build/index.js:298 311 #: build/index.js:1 312 #: src/Inspector.js:400 179 313 msgid "Show Caption On" 180 314 msgstr "" 181 315 182 #: build/index.js:346 183 #: src/Inspector.js:159 184 #: build/index.js:301 316 #: build/index.js:1 317 #: src/Inspector.js:403 185 318 msgid "Default" 186 319 msgstr "" 187 320 188 #: build/index.js:349 189 #: src/Inspector.js:160 190 #: build/index.js:302 321 #: build/index.js:1 322 #: src/Inspector.js:404 191 323 msgid "Hover" 192 324 msgstr "" 193 325 194 #: build/index.js:359 195 #: src/Inspector.js:174 196 #: build/index.js:316 326 #: build/index.js:1 327 #: src/Inspector.js:420 197 328 msgid "Caption Over Image?" 198 329 msgstr "" 199 330 200 #: build/index.js:362 201 #: src/Inspector.js:177 202 #: build/index.js:319 331 #: build/index.js:1 332 #: src/Inspector.js:423 203 333 msgid "No" 204 334 msgstr "" 205 335 206 #: build/index.js:365 207 #: src/Inspector.js:178 208 #: build/index.js:320 336 #: build/index.js:1 337 #: src/Inspector.js:424 209 338 msgid "Yes" 210 339 msgstr "" 211 212 #: build/index.js:485213 #: src/helper/UpgradeMessage.js:7214 #: build/index.js:409215 msgid "Upgrade to Random Image Block Pro to use this feature. We have some features in mind and those will be added to pro version in the future InshAllah. Also you can suggest some too"216 msgstr ""217 218 #: build/index.js:488219 #: src/helper/UpgradeMessage.js:9220 #: build/index.js:411221 msgid "Here"222 msgstr ""223 224 #: build/index.js:492225 #: src/helper/UpgradeMessage.js:13226 #: build/index.js:415227 msgid "Upgrade Now"228 msgstr "" -
random-image-block-for-block-editor/trunk/random-image-block.php
r3449156 r3461135 5 5 * Requires at least: 5.8 6 6 * Requires PHP: 7.0 7 * Version: 1. 0.57 * Version: 1.1.0 8 8 * Author: ultraDevs 9 9 * Author URI: https://ultradevs.com … … 121 121 [ 'ud-random-img-block-pro' => udrib_fs()->is_plan( 'pro' ) ], 122 122 [ 123 'ud-random-img-block-caption-on-hover' => $attributes['captionStyle']['showCaptionOn']&& 'hover' === $attributes['captionStyle']['showCaptionOn']123 'ud-random-img-block-caption-on-hover' => isset( $attributes['captionStyle']['showCaptionOn'] ) && 'hover' === $attributes['captionStyle']['showCaptionOn'] 124 124 ], 125 125 [ 126 'ud-radmon-img-block-caption-over-img' => $attributes['captionStyle']['captionOverlay']["enabled"]&& 'yes' === $attributes['captionStyle']['captionOverlay']["enabled"]126 'ud-radmon-img-block-caption-over-img' => isset( $attributes['captionStyle']['captionOverlay']["enabled"] ) && 'yes' === $attributes['captionStyle']['captionOverlay']["enabled"] 127 127 ] 128 128 ), 129 'style' => '--ud-rib-overlay-position-x:' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['x'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['x'] * 100 ) . '%' : '50%' ) . '; --ud-rib-overlay-position-y:' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['y'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['y'] * 100 ) . '%' : '50%' ) . ';--ud-rib-overlay-position-t-x:-' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['x'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['x'] * 100 ) . '%' : '50%' ) . '; --ud-rib-overlay-position-t-y:-' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['y'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['y'] * 100 ) . '%' : '50%' ) . ';' 129 'style' => '--ud-rib-overlay-position-x:' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['x'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['x'] * 100 ) . '%' : '50%' ) . '; --ud-rib-overlay-position-y:' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['y'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['y'] * 100 ) . '%' : '50%' ) . ';--ud-rib-overlay-position-t-x:-' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['x'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['x'] * 100 ) . '%' : '50%' ) . '; --ud-rib-overlay-position-t-y:-' . ( isset( $attributes['captionStyle']['captionOverlay']['position']['y'] ) ? esc_attr( $attributes['captionStyle']['captionOverlay']['position']['y'] * 100 ) . '%' : '50%' ) . ';', 130 'data-images' => wp_json_encode( $attributes['images'] ), 131 'data-anim-enabled' => ( isset( $attributes['shuffleAnimation'] ) && 'none' !== $attributes['shuffleAnimation'] ) ? 'yes' : 'no', 132 'data-anim-type' => isset( $attributes['shuffleAnimation'] ) ? $attributes['shuffleAnimation'] : 'none', 133 'data-anim-duration' => isset( $attributes['animationDuration'] ) ? $attributes['animationDuration'] : 500, 134 'data-auto-refresh-enabled' => ( isset( $attributes['autoRefresh'] ) && $attributes['autoRefresh'] ) ? 'true' : 'false', 135 'data-auto-refresh-interval'=> isset( $attributes['refreshInterval'] ) ? $attributes['refreshInterval'] : 5, 136 'data-current-index' => isset( $index ) ? $index : 0, 137 'data-link-enabled' => isset( $attributes['linkSettings']['enabled'] ) ? $attributes['linkSettings']['enabled'] : 'none', 138 'data-sticky-mode' => ( isset( $attributes['stickyMode'] ) && $attributes['stickyMode'] ) ? 'yes' : 'no', 139 'data-unique-id' => isset( $attributes['uniqueId'] ) ? $attributes['uniqueId'] : '', 130 140 ]); 131 141 … … 137 147 138 148 $count = count( $images ); 139 $index = ( $count > 1 ) ? wp_rand( 0, $count - 1 ) : 0; 149 150 // Check if rendering in editor (via REST API for ServerSideRender). 151 $is_editor_preview = defined( 'REST_REQUEST' ) && REST_REQUEST; 152 153 // Use stored index only in editor for consistency, always random on frontend. 154 if ( $is_editor_preview && isset( $attributes['selectedImageIndex'] ) && $attributes['selectedImageIndex'] >= 0 && $attributes['selectedImageIndex'] < $count ) { 155 $index = $attributes['selectedImageIndex']; 156 } else { 157 // Frontend always shows random image. 158 $index = ( $count > 1 ) ? wp_rand( 0, $count - 1 ) : 0; 159 } 160 140 161 $content = ( new UDRIB_Generate_CSS( $attributes ) )->css_output(); 141 162 $content .= '<div '. $wrapper_attributes .'>'; -
random-image-block-for-block-editor/trunk/readme.txt
r3449156 r3461135 1 1 === Random Image Block for Block Editor === 2 2 Contributors: mhimon, ultradevs 3 Tags: random image block, random image, image block, block, gutenberg , gutenberg block3 Tags: random image block, random image, image block, block, gutenberg 4 4 Tested up to: 6.9 5 Stable tag: 1. 0.55 Stable tag: 1.1.0 6 6 License: GPL-2.0-or-later 7 7 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 19 19 * Compatible with desktop devices. 20 20 * Easy-to-use Gutenberg block interface. 21 21 * **Link Options** (Attachment page, Custom URL). 22 22 23 23 ## Features (Pro Version) … … 26 26 * Enhanced customization options for advanced users. 27 27 * **Caption Over Image** 28 * **Image Shuffle Animations** (Fade, Slide, Zoom). 29 * **Auto-refresh Interval** functionality. 30 * **Sticky Mode** (Random Seed persistence via local storage). 31 * **Image Filters** (Grayscale, Blur, Brightness, etc.). 28 32 * Priority support. 29 33 … … 47 51 48 52 == Changelog == 53 54 = 1.1.0 - 14 Feb 2026 = 55 * Added: Image Shuffle Animations (Fade, Slide, Zoom). 56 * Added: Auto-refresh Interval functionality. 57 * Added: Sticky Mode (Random Seed persistence via local storage). 58 * Added: Image Filters (Grayscale, Blur, Brightness, Contrast, Saturation, Hue Rotate). 59 * Added: Link Options (Attachment page, Custom URL). 49 60 50 61 = 1.0.5 - 18 Jan 2025 =
Note: See TracChangeset
for help on using the changeset viewer.