Changeset 2958501
- Timestamp:
- 08/25/2023 11:04:06 PM (3 years ago)
- Location:
- sortable-block
- Files:
-
- 22 added
- 10 edited
-
tags/1.5.0 (added)
-
tags/1.5.0/build (added)
-
tags/1.5.0/build/container (added)
-
tags/1.5.0/build/container/block.json (added)
-
tags/1.5.0/build/container/index.asset.php (added)
-
tags/1.5.0/build/container/index.css (added)
-
tags/1.5.0/build/container/index.js (added)
-
tags/1.5.0/build/container/style-index.css (added)
-
tags/1.5.0/build/date (added)
-
tags/1.5.0/build/date/block.json (added)
-
tags/1.5.0/build/date/index.asset.php (added)
-
tags/1.5.0/build/date/index.css (added)
-
tags/1.5.0/build/date/index.js (added)
-
tags/1.5.0/build/date/style-index.css (added)
-
tags/1.5.0/build/entry (added)
-
tags/1.5.0/build/entry/block.json (added)
-
tags/1.5.0/build/entry/index.asset.php (added)
-
tags/1.5.0/build/entry/index.css (added)
-
tags/1.5.0/build/entry/index.js (added)
-
tags/1.5.0/build/entry/style-index.css (added)
-
tags/1.5.0/readme.txt (added)
-
tags/1.5.0/sortable.php (added)
-
trunk/build/container/block.json (modified) (1 diff)
-
trunk/build/container/index.asset.php (modified) (1 diff)
-
trunk/build/container/index.js (modified) (1 diff)
-
trunk/build/date/index.asset.php (modified) (1 diff)
-
trunk/build/date/index.js (modified) (1 diff)
-
trunk/build/entry/index.asset.php (modified) (1 diff)
-
trunk/build/entry/index.js (modified) (1 diff)
-
trunk/build/entry/style-index.css (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/sortable.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sortable-block/trunk/build/container/block.json
r2900958 r2958501 3 3 "apiVersion": 2, 4 4 "name": "sortable/container", 5 "version": "1. 4.3",5 "version": "1.5.0", 6 6 "title": "Sortable", 7 7 "category": "widgets", -
sortable-block/trunk/build/container/index.asset.php
r2900958 r2958501 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' 3a55372dd89019d7cbdc');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '4781cb9dbcde0abcb0e9'); -
sortable-block/trunk/build/container/index.js
r2900958 r2958501 1 (()=>{var e,t={721:(e,t,r)=>{"use strict";const o=window.wp.blocks,l=window.wp.element,n=window.wp.blockEditor,i=window.wp.data;var a=r(184),s=r.n(a);const c=window.wp.i18n,d=window.wp.components,h=window.wp.primitives,u=(0,l.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(h.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),p=(0,l.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(h.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})),v=["sortable/entry"];function m(e){const{clientId:t,attributes:r,setAttributes:o}=e,a=(0,n.useBlockProps)({className:s()({"is-list":"list"===r.layout,"is-grid":"grid"===r.layout,[`columns-${r.columns}`]:"grid"===r.layout})}),{replaceInnerBlocks:h}=(0,i.useDispatch)(n.store),{childBlocks:m}=(0,i.useSelect)((e=>{const{getBlocks:r}=e(n.store);return{childBlocks:r(t)}}),[t]);(0,l.useEffect)((()=>{if(m.length>0&&!r.orderBy||r.order){let e=[];e="asc"===r.order?[...m].sort(((e,t)=>Number(new Date(e.attributes.dateTime))-Number(new Date(t.attributes.dateTime)))):[...m].sort(((e,t)=>Number(new Date(t.attributes.dateTime))-Number(new Date(e.attributes.dateTime)))),o({orderBy:"date"}),h(t,e,!1)}}),[r.orderBy,r.order]),(0,l.useEffect)((()=>{""===r.order&&o({order:"desc"})}),[r.order]);const g="grid"===r.layout?"horizontal":"vertical",w=(0,n.useInnerBlocksProps)(a,{allowedBlocks:v,orientation:g,renderAppender:n.InnerBlocks.ButtonBlockAppender});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(n.InspectorControls,null,"grid"===r.layout&&(0,l.createElement)(d.PanelBody,{title:(0,c.__)("Grid settings")},(0,l.createElement)(d.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Columns"),value:r.columns,onChange:e=>o({columns:e}),min:2,max:6,required:!0})),(0,l.createElement)(d.PanelBody,{title:(0,c.__)("Order settings")},(0,l.createElement)(d.SelectControl,{label:(0,c.__)("Order"),value:r.order,options:[{label:(0,c.__)("Newest to oldest"),value:"desc"},{label:(0,c.__)("Oldest to newest"),value:"asc"}],onChange:e=>o({order:e}),__nextHasNoMarginBottom:!0}))),(0,l.createElement)(n.BlockControls,null,(0,l.createElement)(d.ToolbarGroup,{controls:[{icon:u,title:(0,c.__)("List view"),onClick:()=>o({layout:"list"}),isActive:"list"===r.layout},{icon:p,title:(0,c.__)("Grid view"),onClick:()=>o({layout:"grid"}),isActive:"grid"===r.layout}]})),(0,l.createElement)("div",w))}function g(e){const{clientId:t,name:r,setAttributes:a}=e,{blockType:s,defaultVariation:c,variations:d}=(0,i.useSelect)((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:n}=e(o.store);return{blockType:l(r),defaultVariation:n(r,"block"),variations:t(r,"block")}}),[r,t]),{replaceInnerBlocks:h}=(0,i.useDispatch)(n.store),u=(0,n.useBlockProps)(),[p,v]=(0,l.useState)(!0);return p?(0,l.createElement)("div",u,(0,l.createElement)(n.__experimentalBlockVariationPicker,{icon:s?.icon?.src,label:s?.title,variations:d,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;if(e.innerBlocks.length){if(e.attributes&&a(e.attributes),e.innerBlocks){const r=e.innerBlocks,l=(0,o.createBlocksFromInnerBlocksTemplate)(r);h(t,l,!0)}}else v(!1)},allowSkip:!0})):(0,l.createElement)(m,e)}const w=(0,l.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,l.createElement)(d.Path,{d:"M24 9h-2v-5h-7v-2h9v7zm-9 13v-2h7v-5h2v7h-9zm-15-7h2v5h7v2h-9v-7zm9-13v2h-7v5h-2v-7h9z"})),b=(0,l.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,l.createElement)(d.Path,{d:"M6 6h-6v-6h6v6zm9-6h-6v6h6v-6zm9 0h-6v6h6v-6zm-18 9h-6v6h6v-6zm9 0h-6v6h6v-6zm9 0h-6v6h6v-6zm-18 9h-6v6h6v-6zm9 0h-6v6h6v-6zm9 0h-6v6h6v-6z"})),f=(0,l.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,l.createElement)(d.Path,{d:"M24 3h-24v-2h24v2zm0 3h-24v2h24v-2zm0 5h-24v2h24v-2zm0 5h-24v2h24v-2zm0 5h-24v2h24v-2z"})),y=[{name:"empty-container",title:(0,c.__)("Empty"),icon:w,description:(0,c.__)("Display an empty container"),attributes:{layout:"list",columns:3,orderBy:"date",order:"desc"},innerBlocks:[],scope:["block"],isDefault:!0},{name:"grid-date-title-description",title:(0,c.__)("Grid View with date, title, text"),icon:b,description:(0,c.__)("Display multiple columns in a grid with date, title and description"),attributes:{layout:"grid",columns:3,orderBy:"date",order:"desc"},innerBlocks:[["sortable/entry",{dateTime:"2022-12-15T17:56:46"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]],["sortable/entry",{dateTime:"2022-08-25T17:37:00"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]],["sortable/entry",{dateTime:"2022-06-02T17:36:00"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]]],scope:["block"]},{name:"list-date-title-description",title:(0,c.__)("List View with date, title, text"),icon:f,description:(0,c.__)("Display multiple lines in a list with date, title and description"),attributes:{layout:"list",columns:3,orderBy:"date",order:"desc"},innerBlocks:[["sortable/entry",{dateTime:"2022-12-15T17:56:46"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]],["sortable/entry",{dateTime:"2022-08-25T17:37:00"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]],["sortable/entry",{dateTime:"2022-06-02T17:36:00"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]]],scope:["block"]}],k=JSON.parse('{"u2":"sortable/container"}');(0,o.registerBlockType)(k.u2,{edit:e=>{const{clientId:t}=e,r=(0,i.useSelect)((e=>!!e(n.store).getBlocks(t).length),[t])?m:g;return(0,l.createElement)(r,e)},save:function(e){const{attributes:t}=e,r=n.useInnerBlocksProps.save(n.useBlockProps.save({className:s()({"is-list":"list"===t.layout,"is-grid":"grid"===t.layout,[`columns-${t.columns}`]:"grid"===t.layout})}));return(0,l.createElement)("div",r)},variations:y})},184:(e,t)=>{var r;!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var n=typeof r;if("string"===n||"number"===n)e.push(r);else if(Array.isArray(r)){if(r.length){var i=l.apply(null,r);i&&e.push(i)}}else if("object"===n){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var a in r)o.call(r,a)&&r[a]&&e.push(a)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(r=function(){return l}.apply(t,[]))||(e.exports=r)}()}},r={};function o(e){var l=r[e];if(void 0!==l)return l.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,r,l,n)=>{if(!r){var i=1/0;for(d=0;d<e.length;d++){for(var[r,l,n]=e[d],a=!0,s=0;s<r.length;s++)(!1&n||i>=n)&&Object.keys(o.O).every((e=>o.O[e](r[s])))?r.splice(s--,1):(a=!1,n<i&&(i=n));if(a){e.splice(d--,1);var c=l();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]=[r,l,n]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={837:0,989:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var l,n,[i,a,s]=r,c=0;if(i.some((t=>0!==e[t]))){for(l in a)o.o(a,l)&&(o.m[l]=a[l]);if(s)var d=s(o)}for(t&&t(r);c<i.length;c++)n=i[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(d)},r=globalThis.webpackChunksortable=globalThis.webpackChunksortable||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var l=o.O(void 0,[989],(()=>o(721)));l=o.O(l)})();1 !function(){var e,t={879:function(e,t,r){"use strict";var n=window.wp.blocks,o=window.wp.element,l=window.wp.blockEditor,a=window.wp.data,i=r(184),c=r.n(i),s=window.wp.i18n,d=window.wp.components,u=window.wp.primitives,p=(0,o.createElement)(u.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(u.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),h=(0,o.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(u.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"}));const m=["sortable/entry"];function v(e){const{clientId:t,attributes:r,setAttributes:n}=e,i=(0,l.useBlockProps)({className:c()({"is-list":"list"===r.layout,"is-grid":"grid"===r.layout,[`columns-${r.columns}`]:"grid"===r.layout})}),{replaceInnerBlocks:u}=(0,a.useDispatch)(l.store),{childBlocks:v}=(0,a.useSelect)((e=>{const{getBlocks:r}=e(l.store);return{childBlocks:r(t)}}),[t]);(0,o.useEffect)((()=>{if(v.length>0&&!r.orderBy||r.order){let e=[];e="asc"===r.order?[...v].sort(((e,t)=>Number(new Date(e.attributes.dateTime))-Number(new Date(t.attributes.dateTime)))):[...v].sort(((e,t)=>Number(new Date(t.attributes.dateTime))-Number(new Date(e.attributes.dateTime)))),n({orderBy:"date"}),u(t,e,!1)}}),[r.orderBy,r.order]),(0,o.useEffect)((()=>{""===r.order&&n({order:"desc"})}),[r.order]);const g="grid"===r.layout?"horizontal":"vertical",b=(0,l.useInnerBlocksProps)(i,{allowedBlocks:m,orientation:g,renderAppender:l.InnerBlocks.ButtonBlockAppender});return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.InspectorControls,null,"grid"===r.layout&&(0,o.createElement)(d.PanelBody,{title:(0,s.__)("Grid settings")},(0,o.createElement)(d.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Columns"),value:r.columns,onChange:e=>n({columns:e}),min:2,max:6,required:!0})),(0,o.createElement)(d.PanelBody,{title:(0,s.__)("Order settings")},(0,o.createElement)(d.SelectControl,{label:(0,s.__)("Order"),value:r.order,options:[{label:(0,s.__)("Newest to oldest"),value:"desc"},{label:(0,s.__)("Oldest to newest"),value:"asc"}],onChange:e=>n({order:e}),__nextHasNoMarginBottom:!0}))),(0,o.createElement)(l.BlockControls,null,(0,o.createElement)(d.ToolbarGroup,{controls:[{icon:p,title:(0,s.__)("List view"),onClick:()=>n({layout:"list"}),isActive:"list"===r.layout},{icon:h,title:(0,s.__)("Grid view"),onClick:()=>n({layout:"grid"}),isActive:"grid"===r.layout}]})),(0,o.createElement)("div",{...b}))}function g(e){const{clientId:t,name:r,openPatternSelectionModal:i,setAttributes:c}=e,u="blank",p="content",[h,m]=(0,o.useState)("picker"),{blockType:g,defaultVariation:b,variations:f}=(0,a.useSelect)((e=>{const{getBlockVariations:t,getBlockType:o,getDefaultBlockVariation:l}=e(n.store);return{blockType:o(r),defaultVariation:l(r,"block"),variations:t(r,"block")}}),[r,t]),{replaceInnerBlocks:w}=(0,a.useDispatch)(l.store),k=(0,l.useBlockProps)();return h===u?(0,o.createElement)(l.__experimentalBlockVariationPicker,{icon:g?.icon?.src,label:g?.title,variations:f,onSelect:(e=b)=>{if(e.innerBlocks.length){if(e.attributes&&c(e.attributes),e.innerBlocks){const r=e.innerBlocks,o=(0,n.createBlocksFromInnerBlocksTemplate)(r);w(t,o,!0)}m(p)}else m(p)},allowSkip:!0}):h===p?(0,o.createElement)(v,{...e}):(0,o.createElement)("div",{...k},(0,o.createElement)(d.Placeholder,{icon:g?.icon?.src,label:g?.title,instructions:(0,s.__)("Choose a pattern or start blank.")},(0,o.createElement)(d.Button,{variant:"primary",onClick:i},(0,s.__)("Choose")),(0,o.createElement)(d.Button,{variant:"secondary",onClick:()=>{m(u)}},(0,s.__)("Start blank"))))}function b({clientId:e,attributes:t,setIsPatternSelectionModalOpen:r}){const{replaceBlock:n,selectBlock:i}=(0,a.useDispatch)(l.store),c=function(e){return(0,a.useSelect)((t=>{const{getBlockRootClientId:r,getPatternsByBlockTypes:n}=t(l.store);return n("sortable/container",r(e))}),[e])}(e);return(0,o.createElement)(d.Modal,{overlayClassName:"block-library-sortable-pattern__selection-modal",title:(0,s.__)("Choose a pattern"),onRequestClose:()=>r(!1),isFullScreen:!0},(0,o.createElement)("div",{className:"block-library-sortable-pattern__selection-content"},(0,o.createElement)(l.__experimentalBlockPatternsList,{blockPatterns:c,shownPatterns:c,onClickPattern:(r,o)=>{const{newBlocks:l,clientIds:a}=f(o,t);n(e,l),a[0]&&i(a[0])}})))}const f=e=>({newBlocks:e.map((e=>e)),clientIds:e.map((e=>e.clientId))});const w=(0,o.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,o.createElement)(d.Path,{d:"M24 9h-2v-5h-7v-2h9v7zm-9 13v-2h7v-5h2v7h-9zm-15-7h2v5h7v2h-9v-7zm9-13v2h-7v5h-2v-7h9z"})),k=(0,o.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,o.createElement)(d.Path,{d:"M6 6h-6v-6h6v6zm9-6h-6v6h6v-6zm9 0h-6v6h6v-6zm-18 9h-6v6h6v-6zm9 0h-6v6h6v-6zm9 0h-6v6h6v-6zm-18 9h-6v6h6v-6zm9 0h-6v6h6v-6zm9 0h-6v6h6v-6z"})),y=(0,o.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,o.createElement)(d.Path,{d:"M24 3h-24v-2h24v2zm0 3h-24v2h24v-2zm0 5h-24v2h24v-2zm0 5h-24v2h24v-2zm0 5h-24v2h24v-2z"}));var B=[{name:"empty-container",title:(0,s.__)("Empty"),icon:w,description:(0,s.__)("Display an empty container"),attributes:{layout:"list",columns:3,orderBy:"date",order:"desc"},innerBlocks:[],scope:["block"],isDefault:!0},{name:"grid-date-title-description",title:(0,s.__)("Grid View"),icon:k,description:(0,s.__)("Display multiple columns in a grid with date, title and description"),attributes:{layout:"grid",columns:3,orderBy:"date",order:"desc"},innerBlocks:[["sortable/entry",{dateTime:"2022-12-15T17:56:46"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]],["sortable/entry",{dateTime:"2022-08-25T17:37:00"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]],["sortable/entry",{dateTime:"2022-06-02T17:36:00"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]]],scope:["block"]},{name:"list-date-title-description",title:(0,s.__)("List View"),icon:y,description:(0,s.__)("Display multiple lines in a list with date, title and description"),attributes:{layout:"list",columns:3,orderBy:"date",order:"desc"},innerBlocks:[["sortable/entry",{dateTime:"2022-12-15T17:56:46"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]],["sortable/entry",{dateTime:"2022-08-25T17:37:00"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]],["sortable/entry",{dateTime:"2022-06-02T17:36:00"},[["core/group",{},[["sortable/date",{fontSize:"small"}],["core/heading",{fontSize:"large",placeholder:"Enter title..."}]]],["core/paragraph",{placeholder:"Enter description..."}]]]],scope:["block"]}],_=JSON.parse('{"u2":"sortable/container"}');(0,n.registerBlockType)(_.u2,{edit:e=>{const{clientId:t,attributes:r}=e,[n,i]=(0,o.useState)(!1),c=(0,a.useSelect)((e=>!!e(l.store).getBlocks(t).length),[t])?v:g;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c,{...e,openPatternSelectionModal:()=>i(!0)}),n&&(0,o.createElement)(b,{clientId:t,attributes:r,setIsPatternSelectionModalOpen:i}))},save:function(e){const{attributes:t}=e,r=l.useInnerBlocksProps.save(l.useBlockProps.save({className:c()({"is-list":"list"===t.layout,"is-grid":"grid"===t.layout,[`columns-${t.columns}`]:"grid"===t.layout})}));return(0,o.createElement)("div",{...r})},variations:B})},184:function(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var l=typeof r;if("string"===l||"number"===l)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===l){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var l=r[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=function(t,r,o,l){if(!r){var a=1/0;for(d=0;d<e.length;d++){r=e[d][0],o=e[d][1],l=e[d][2];for(var i=!0,c=0;c<r.length;c++)(!1&l||a>=l)&&Object.keys(n.O).every((function(e){return n.O[e](r[c])}))?r.splice(c--,1):(i=!1,l<a&&(a=l));if(i){e.splice(d--,1);var s=o();void 0!==s&&(t=s)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[r,o,l]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={837:0,989:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,l,a=r[0],i=r[1],c=r[2],s=0;if(a.some((function(t){return 0!==e[t]}))){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(c)var d=c(n)}for(t&&t(r);s<a.length;s++)l=a[s],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(d)},r=self.webpackChunksortable=self.webpackChunksortable||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var o=n.O(void 0,[989],(function(){return n(879)}));o=n.O(o)}(); -
sortable-block/trunk/build/date/index.asset.php
r2900958 r2958501 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => 'c 3f361cab3b95d18dcb5');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => 'ccd9aa907c6bca35e251'); -
sortable-block/trunk/build/date/index.js
r2900958 r2958501 1 (()=>{"use strict";var e,t={974:()=>{const e=window.wp.blocks,t=window.wp.element,r=window.wp.i18n,o=window.wp.coreData,a=window.wp.date,n=window.wp.data,s=window.wp.blockEditor,l=window.wp.components,i=JSON.parse('{"u2":"sortable/date"}');(0,e.registerBlockType)(i.u2,{edit:function(e){const{context:i,attributes:c,setAttributes:m,clientId:u}=e,p=(0,s.useBlockProps)(),d=(0,a.getSettings)(),{getBlock:w,getBlockParents:f}=(0,n.useSelect)((e=>({getBlockParents:e(s.store).getBlockParents,getBlock:e(s.store).getBlock})),[]),{selectBlock:g}=(0,n.useDispatch)(s.store),[v=d.formats.date]=(0,o.useEntityProp)("root","site","date_format"),[b=d.formats.time]=(0,o.useEntityProp)("root","site","time_format"),k=i["sortable/entryDateTime"],h=(0,t.createElement)("time",{dateTime:(0,a.format)("c",k)},(0,a.format)(c.format||v,k));return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(s.InspectorControls,null,(0,t.createElement)(l.PanelBody,{title:(0,r.__)("Settings")},(0,t.createElement)(s.__experimentalDateFormatPicker,{format:c.format,defaultFormat:v,is12Hour:(y=b,/(?:^|[^\\])[aAgh]/.test(y)),onChange:e=>m({format:e})}),(0,t.createElement)(l.Button,{variant:"secondary",onClick:()=>{const e=f(u)[1];"sortable/entry"===w(e).name&&g(e)}},(0,r.__)("Change date","sortable")))),(0,t.createElement)("div",p,h));var y},save:function(){return null}})}},r={};function o(e){var a=r[e];if(void 0!==a)return a.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,r,a,n)=>{if(!r){var s=1/0;for(m=0;m<e.length;m++){for(var[r,a,n]=e[m],l=!0,i=0;i<r.length;i++)(!1&n||s>=n)&&Object.keys(o.O).every((e=>o.O[e](r[i])))?r.splice(i--,1):(l=!1,n<s&&(s=n));if(l){e.splice(m--,1);var c=a();void 0!==c&&(t=c)}}return t}n=n||0;for(var m=e.length;m>0&&e[m-1][2]>n;m--)e[m]=e[m-1];e[m]=[r,a,n]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={964:0,966:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var a,n,[s,l,i]=r,c=0;if(s.some((t=>0!==e[t]))){for(a in l)o.o(l,a)&&(o.m[a]=l[a]);if(i)var m=i(o)}for(t&&t(r);c<s.length;c++)n=s[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(m)},r=globalThis.webpackChunksortable=globalThis.webpackChunksortable||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=o.O(void 0,[966],(()=>o(974)));a=o.O(a)})();1 !function(){"use strict";var t,e={974:function(){var t=window.wp.blocks,e=window.wp.element,r=window.wp.i18n,n=window.wp.coreData,o=window.wp.date,a=window.wp.data,i=window.wp.blockEditor,s=window.wp.components,c=JSON.parse('{"u2":"sortable/date"}');(0,t.registerBlockType)(c.u2,{edit:function(t){const{context:c,attributes:l,setAttributes:u,clientId:f}=t,m=(0,i.useBlockProps)(),p=(0,o.getSettings)(),{getBlock:d,getBlockParents:w}=(0,a.useSelect)((t=>({getBlockParents:t(i.store).getBlockParents,getBlock:t(i.store).getBlock})),[]),{selectBlock:v}=(0,a.useDispatch)(i.store),[g=p.formats.date]=(0,n.useEntityProp)("root","site","date_format"),[k=p.formats.time]=(0,n.useEntityProp)("root","site","time_format"),b=c["sortable/entryDateTime"],h=(0,e.createElement)("time",{dateTime:(0,o.format)("c",b)},(0,o.format)(l.format||g,b));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(i.InspectorControls,null,(0,e.createElement)(s.PanelBody,{title:(0,r.__)("Settings")},(0,e.createElement)(i.__experimentalDateFormatPicker,{format:l.format,defaultFormat:g,is12Hour:(y=k,/(?:^|[^\\])[aAgh]/.test(y)),onChange:t=>u({format:t})}),(0,e.createElement)(s.Button,{variant:"secondary",onClick:()=>{const t=w(f)[1];"sortable/entry"===d(t).name&&v(t)}},(0,r.__)("Change date","sortable")))),(0,e.createElement)("div",{...m},h));var y},save:function(){return null}})}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var a=r[t]={exports:{}};return e[t](a,a.exports,n),a.exports}n.m=e,t=[],n.O=function(e,r,o,a){if(!r){var i=1/0;for(u=0;u<t.length;u++){r=t[u][0],o=t[u][1],a=t[u][2];for(var s=!0,c=0;c<r.length;c++)(!1&a||i>=a)&&Object.keys(n.O).every((function(t){return n.O[t](r[c])}))?r.splice(c--,1):(s=!1,a<i&&(i=a));if(s){t.splice(u--,1);var l=o();void 0!==l&&(e=l)}}return e}a=a||0;for(var u=t.length;u>0&&t[u-1][2]>a;u--)t[u]=t[u-1];t[u]=[r,o,a]},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t={964:0,966:0};n.O.j=function(e){return 0===t[e]};var e=function(e,r){var o,a,i=r[0],s=r[1],c=r[2],l=0;if(i.some((function(e){return 0!==t[e]}))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(c)var u=c(n)}for(e&&e(r);l<i.length;l++)a=i[l],n.o(t,a)&&t[a]&&t[a][0](),t[a]=0;return n.O(u)},r=self.webpackChunksortable=self.webpackChunksortable||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))}();var o=n.O(void 0,[966],(function(){return n(974)}));o=n.O(o)}(); -
sortable-block/trunk/build/entry/index.asset.php
r2900958 r2958501 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' 422248ec6e3ce9bfd5e2');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '5b47a02e3f62bc67b775'); -
sortable-block/trunk/build/entry/index.js
r2900958 r2958501 1 (()=>{"use strict";var e,t={900:()=>{const e=window.wp.blocks,t=window.wp.element,r=window.wp.i18n,o=window.wp.blockEditor,n=window.wp.components,l=window.wp.data,s=["sortable/date","core/heading","core/paragraph","core/media-text","core/group","core/columns","core/block"],a=JSON.parse('{"u2":"sortable/entry"}');(0,e.registerBlockType)(a.u2,{edit:function(e){const{clientId:a,attributes:c,setAttributes:i}=e,{dateTime:d}=c,u=(0,o.useBlockProps)(),{updateBlockAttributes:p}=(0,l.useDispatch)(o.store),{rootClientId:w,childBlocks:k}=(0,l.useSelect)((e=>{const{getBlockRootClientId:t,getBlock:r}=e(o.store),n=t(a),l=r(a);return{rootClientId:n,childBlocks:l?l.innerBlocks:[]}}),[a]);(0,t.useEffect)((()=>{d||(i({dateTime:new Date}),p(w,{orderBy:""}))}),[d]);const b=(0,o.useInnerBlocksProps)(u,{allowedBlocks:s,orientation:"horizontal",renderAppender:k.length?void 0:o.InnerBlocks.ButtonBlockAppender});return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(o.InspectorControls,null,(0,t.createElement)(n.PanelBody,{title:(0,r.__)("Date Settings","sortable")},(0,t.createElement)(n.PanelRow,{className:"sortable-block__date-row"},(0,t.createElement)(n.DateTimePicker,{currentDate:d,onChange:e=>{i({dateTime:e}),p(w,{orderBy:""})},is12Hour:!0})))),(0,t.createElement)("div",b))},save:function(){const e=o.useInnerBlocksProps.save(o.useBlockProps.save());return(0,t.createElement)("div",e)}})}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var l=r[e]={exports:{}};return t[e](l,l.exports,o),l.exports}o.m=t,e=[],o.O=(t,r,n,l)=>{if(!r){var s=1/0;for(d=0;d<e.length;d++){for(var[r,n,l]=e[d],a=!0,c=0;c<r.length;c++)(!1&l||s>=l)&&Object.keys(o.O).every((e=>o.O[e](r[c])))?r.splice(c--,1):(a=!1,l<s&&(s=l));if(a){e.splice(d--,1);var i=n();void 0!==i&&(t=i)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[r,n,l]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={955:0,22:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var n,l,[s,a,c]=r,i=0;if(s.some((t=>0!==e[t]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(c)var d=c(o)}for(t&&t(r);i<s.length;i++)l=s[i],o.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return o.O(d)},r=globalThis.webpackChunksortable=globalThis.webpackChunksortable||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var n=o.O(void 0,[22],(()=>o(900)));n=o.O(n)})();1 !function(){"use strict";var e,t={900:function(){var e=window.wp.blocks,t=window.wp.element,r=window.wp.i18n,n=window.wp.blockEditor,o=window.wp.components,c=window.wp.data;const l=["sortable/date","core/heading","core/paragraph","core/media-text","core/group","core/columns","core/block"];var i=JSON.parse('{"u2":"sortable/entry"}');(0,e.registerBlockType)(i.u2,{edit:function(e){const{clientId:i,attributes:s,setAttributes:a}=e,{dateTime:u}=s,d=(0,n.useBlockProps)(),{updateBlockAttributes:p}=(0,c.useDispatch)(n.store),{rootClientId:f,childBlocks:w}=(0,c.useSelect)((e=>{const{getBlockRootClientId:t,getBlock:r}=e(n.store),o=t(i),c=r(i);return{rootClientId:o,childBlocks:c?c.innerBlocks:[]}}),[i]);(0,t.useEffect)((()=>{u||(a({dateTime:new Date}),p(f,{orderBy:""}))}),[u]);const k=(0,n.useInnerBlocksProps)(d,{allowedBlocks:l,orientation:"horizontal",renderAppender:w.length?void 0:n.InnerBlocks.ButtonBlockAppender});return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.InspectorControls,null,(0,t.createElement)(o.PanelBody,{title:(0,r.__)("Date Settings","sortable")},(0,t.createElement)(o.PanelRow,{className:"sortable-block__date-row"},(0,t.createElement)(o.DateTimePicker,{currentDate:u,onChange:e=>{a({dateTime:e}),p(f,{orderBy:""})},is12Hour:!0})))),(0,t.createElement)("div",{...k}))},save:function(){const e=n.useInnerBlocksProps.save(n.useBlockProps.save());return(0,t.createElement)("div",{...e})}})}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var c=r[e]={exports:{}};return t[e](c,c.exports,n),c.exports}n.m=t,e=[],n.O=function(t,r,o,c){if(!r){var l=1/0;for(u=0;u<e.length;u++){r=e[u][0],o=e[u][1],c=e[u][2];for(var i=!0,s=0;s<r.length;s++)(!1&c||l>=c)&&Object.keys(n.O).every((function(e){return n.O[e](r[s])}))?r.splice(s--,1):(i=!1,c<l&&(l=c));if(i){e.splice(u--,1);var a=o();void 0!==a&&(t=a)}}return t}c=c||0;for(var u=e.length;u>0&&e[u-1][2]>c;u--)e[u]=e[u-1];e[u]=[r,o,c]},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={955:0,22:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,c,l=r[0],i=r[1],s=r[2],a=0;if(l.some((function(t){return 0!==e[t]}))){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(s)var u=s(n)}for(t&&t(r);a<l.length;a++)c=l[a],n.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return n.O(u)},r=self.webpackChunksortable=self.webpackChunksortable||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var o=n.O(void 0,[22],(function(){return n(900)}));o=n.O(o)}(); -
sortable-block/trunk/build/entry/style-index.css
r2870391 r2958501 1 .wp-block-sortable-entry>:first-child{ -webkit-margin-before:0;margin-block-start:0}.wp-block-sortable-entry>:last-child{-webkit-margin-after:0;margin-block-end:0}1 .wp-block-sortable-entry>:first-child{margin-block-start:0}.wp-block-sortable-entry>:last-child{margin-block-end:0} -
sortable-block/trunk/readme.txt
r2900958 r2958501 3 3 Author URI: https://tarascodes.com/ 4 4 Tags: block, sorting, sort, blocks, filter, block sort, blocks sorting, filter content, simple events calendar, product changelog, timeline 5 Tested up to: 6. 25 Tested up to: 6.3 6 6 Requires at Least: 6.1 7 7 Requires PHP: 7.4 8 Stable tag: 1. 4.38 Stable tag: 1.5.0 9 9 Text Domain: sortable 10 10 License: GPLv2 or later … … 15 15 == Description == 16 16 17 The Sortable Block plugin enables you to create sortable sections on your website using WordPress blocks. This powerful tool allows you to effortlesslybuild and organize content within a container, with each inner section being sortable by date.17 The Sortable Block plugin enables you to create sortable sections on a website using WordPress blocks. This plugin allows to build and organize content within a container, with each inner section being sortable by date. 18 18 19 19 With the flexibility of using any WordPress block to design your inner sections, you can create a variety of layouts tailored to your needs. This plugin is perfect for managing event calendars, product changelogs, media mentions, and more. 20 20 21 Choose between two layout options - list and grid - for even more customization and a seamless user experience.21 The Sortable Block plugin allows to choose between two layout options - list and grid - for even more customization and a seamless user experience. 22 22 23 23 Create dynamic, sortable sections with ease using the Sortable Block plugin! … … 82 82 83 83 == Changelog == 84 85 = 1.5.0 - August 25, 2023 = 86 87 * Add: pre-made layout in Patterns to create Changelog List; 88 * Add: allow to select pre-defined pattern when block first added to content area; 89 * Update: refactor welcome screen when block first added to content area; 90 * Update: formatting in files; 91 * Update: simplify labels for Variations screen; 84 92 85 93 = 1.4.3 - April 18, 2023 = -
sortable-block/trunk/sortable.php
r2900958 r2958501 5 5 * Requires at least: 6.1 6 6 * Requires PHP: 7.4 7 * Version: 1. 4.37 * Version: 1.5.0 8 8 * Author: Taras Dashkevych 9 9 * Author URI: https://tarascodes.com/ … … 24 24 function sortable_plugin_init() { 25 25 // Register Sortable Date block. 26 register_block_type( __DIR__ . '/build/date',array( 27 'render_callback' => 'render_block_sortable_date', 28 ) ); 26 register_block_type( 27 __DIR__ . '/build/date', 28 array( 29 'render_callback' => 'render_block_sortable_date', 30 ) 31 ); 29 32 // Register Sortable Entry block. 30 33 register_block_type( __DIR__ . '/build/entry' ); 31 34 // Register Sortable block. 32 35 register_block_type( __DIR__ . '/build/container' ); 36 // Register Pattern. 37 register_block_pattern( 38 'sortable/changelog-layout-1', 39 array( 40 'title' => esc_html__( 'Changelog List', 'sortable' ), 41 'description' => _x( 'Layout to create changelog list with version number, date, and list.', 'Block pattern description', 'sortable' ), 42 'blockTypes' => array( 'sortable/container' ), 43 'content' => '<!-- wp:sortable/container --> 44 <div class="wp-block-sortable-container is-list"> 45 <!-- wp:sortable/entry {"dateTime":"2023-08-28T10:21:00"} --> 46 <div class="wp-block-sortable-entry"> 47 <!-- wp:group {"style":{"spacing":{"blockGap":"1.5em"}},"layout":{"type":"constrained"}} --> 48 <div class="wp-block-group"> 49 <!-- wp:separator {"backgroundColor":"cyan-bluish-gray"} --> 50 <hr class="wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background" /> 51 <!-- /wp:separator --> 52 <!-- wp:group {"style":{"spacing":{"blockGap":"1em"}},"layout":{"type":"flex","orientation":"vertical"}} --> 53 <div class="wp-block-group"> 54 <!-- wp:group {"style":{"spacing":{"blockGap":"1em"}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"center"}} --> 55 <div class="wp-block-group"> 56 <!-- wp:paragraph --> 57 <p><strong>1.1.0</strong></p> 58 <!-- /wp:paragraph --> 59 <!-- wp:sortable/date {"textColor":"vivid-purple"} /--> 60 </div> 61 <!-- /wp:group --> 62 <!-- wp:list {"fontSize":"normal"} --> 63 <ul class="has-normal-font-size"> 64 <!-- wp:list-item --> 65 <li><strong>Add:</strong> support for colors in Sortable Date block;</li> 66 <!-- /wp:list-item --> 67 <!-- wp:list-item --> 68 <li><strong>Add:</strong> support for padding dimensions in Sortable Date block;</li> 69 <!-- /wp:list-item --> 70 <!-- wp:list-item --> 71 <li><strong>Update:</strong> improve Insert buttons in the editor;</li> 72 <!-- /wp:list-item --> 73 <!-- wp:list-item --> 74 <li><strong>Update:</strong> detect time format in Sortable Date block;</li> 75 <!-- /wp:list-item --> 76 <!-- wp:list-item --> 77 <li><strong>Update:</strong> allow Group block in Sortable Entry;</li> 78 <!-- /wp:list-item --> 79 <!-- wp:list-item --> 80 <li><strong>Fix:</strong> style back-end issues;</li> 81 <!-- /wp:list-item --> 82 <!-- wp:list-item --> 83 <li><strong>Fix:</strong> button contrast issue in Sortable Container;</li> 84 <!-- /wp:list-item --> 85 <!-- wp:list-item --> 86 <li><strong>Fix:</strong> wrong time output in Sortable Date block when viewed on front-end;</li> 87 <!-- /wp:list-item --> 88 </ul> 89 <!-- /wp:list --> 90 </div> 91 <!-- /wp:group --> 92 </div> 93 <!-- /wp:group --> 94 </div> 95 <!-- /wp:sortable/entry --> 96 <!-- wp:sortable/entry {"dateTime":"2023-07-12T10:21:00"} --> 97 <div class="wp-block-sortable-entry"> 98 <!-- wp:group {"style":{"spacing":{"blockGap":"1.5em"}},"layout":{"type":"constrained"}} --> 99 <div class="wp-block-group"> 100 <!-- wp:separator {"backgroundColor":"cyan-bluish-gray"} --> 101 <hr class="wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background" /> 102 <!-- /wp:separator --> 103 <!-- wp:group {"style":{"spacing":{"blockGap":"1em"}},"layout":{"type":"flex","orientation":"vertical"}} --> 104 <div class="wp-block-group"> 105 <!-- wp:group {"style":{"spacing":{"blockGap":"1em"}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"center"}} --> 106 <div class="wp-block-group"> 107 <!-- wp:paragraph --> 108 <p><strong>1.0.1</strong></p> 109 <!-- /wp:paragraph --> 110 <!-- wp:sortable/date {"textColor":"vivid-purple"} /--> 111 </div> 112 <!-- /wp:group --> 113 <!-- wp:list {"fontSize":"normal"} --> 114 <ul class="has-normal-font-size"> 115 <!-- wp:list-item --> 116 <li><strong>Update:</strong> allow Group block in Sortable Entry;</li> 117 <!-- /wp:list-item --> 118 <!-- wp:list-item --> 119 <li><strong>Update:</strong> detect time format in Sortable Date block;</li> 120 <!-- /wp:list-item --> 121 <!-- wp:list-item --> 122 <li><strong>Update:</strong> improve Insert buttons in the editor;</li> 123 <!-- /wp:list-item --> 124 <!-- wp:list-item --> 125 <li><strong>Fix:</strong> style back-end issues;</li> 126 <!-- /wp:list-item --> 127 <!-- wp:list-item --> 128 <li><strong>Fix:</strong> wrong time output in Sortable Date block when viewed on front-end;</li> 129 <!-- /wp:list-item --> 130 </ul> 131 <!-- /wp:list --> 132 </div> 133 <!-- /wp:group --> 134 </div> 135 <!-- /wp:group --> 136 </div> 137 <!-- /wp:sortable/entry --> 138 <!-- wp:sortable/entry {"dateTime":"2022-05-05T10:21:00"} --> 139 <div class="wp-block-sortable-entry"> 140 <!-- wp:group {"style":{"spacing":{"blockGap":"1.5em"}},"layout":{"type":"constrained"}} --> 141 <div class="wp-block-group"> 142 <!-- wp:separator {"backgroundColor":"cyan-bluish-gray"} --> 143 <hr class="wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background" /> 144 <!-- /wp:separator --> 145 <!-- wp:group {"style":{"spacing":{"blockGap":"1em"}},"layout":{"type":"flex","orientation":"vertical"}} --> 146 <div class="wp-block-group"> 147 <!-- wp:group {"style":{"spacing":{"blockGap":"1em"}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"center"}} --> 148 <div class="wp-block-group"> 149 <!-- wp:paragraph --> 150 <p><strong>1.0.0</strong></p> 151 <!-- /wp:paragraph --> 152 <!-- wp:sortable/date {"textColor":"vivid-purple"} /--> 153 </div> 154 <!-- /wp:group --> 155 <!-- wp:list {"fontSize":"normal"} --> 156 <ul class="has-normal-font-size"> 157 <!-- wp:list-item --> 158 <li>Initial release.</li> 159 <!-- /wp:list-item --> 160 </ul> 161 <!-- /wp:list --> 162 </div> 163 <!-- /wp:group --> 164 </div> 165 <!-- /wp:group --> 166 </div> 167 <!-- /wp:sortable/entry --> 168 </div> 169 <!-- /wp:sortable/container -->', 170 ) 171 ); 33 172 } 34 173 add_action( 'init', 'sortable_plugin_init' ); … … 54 193 55 194 $date_unix_timestamp = strtotime( $block->context['sortable/entryDateTime'] ); 56 $unformatted_date = date_i18n( 'c', $date_unix_timestamp );195 $unformatted_date = date_i18n( 'c', $date_unix_timestamp ); 57 196 $formatted_date = date_i18n( $date_format, $date_unix_timestamp ); 58 197 $wrapper_attributes = get_block_wrapper_attributes();
Note: See TracChangeset
for help on using the changeset viewer.