File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import schema from './schema'
1717import metadata from './block.json'
1818import example from './example'
1919import deprecated from './deprecated'
20+ import substitute from './substitute'
2021
2122/**
2223 * WordPress dependencies
@@ -40,4 +41,5 @@ export const settings = {
4041 variations,
4142 edit,
4243 save,
44+ substitute,
4345}
Original file line number Diff line number Diff line change 1+ export const substitute = {
2+ from : 'stackable/card' ,
3+ variants : [ ] ,
4+ to : [ 'stackable/columns' ] ,
5+ transform : ( oldAttributes , innerBlocks ) => {
6+ return [
7+ 'stackable/columns' ,
8+ { uniqueId : 'test' } ,
9+ [
10+ [
11+ 'stackable/column' ,
12+ {
13+ align : oldAttributes . align ,
14+ hasContainer : true ,
15+ } ,
16+ [
17+ [ 'stackable/image' , { imageUrl : oldAttributes . imageUrl } ] ,
18+ ...innerBlocks ,
19+ ] ,
20+ ] ,
21+ ] ,
22+ ]
23+ } ,
24+ }
25+
26+ export default substitute
You can’t perform that action at this time.
0 commit comments