File tree Expand file tree Collapse file tree 7 files changed +51
-0
lines changed
Expand file tree Collapse file tree 7 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import save from './save'
1111import schema from './schema'
1212import example from './example'
1313import deprecated from './deprecated'
14+ import substitute from './substitute'
1415
1516/**
1617 * External 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/blockquote' ,
3+ to : 'core/pullquote' ,
4+ transform : ( oldAttributes , innerBlocks ) => {
5+ return {
6+ value : innerBlocks [ 1 ] [ 1 ] . text ,
7+ align : oldAttributes . contentAlign ,
8+ }
9+ } ,
10+ }
11+
12+ export default substitute
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export const substitute = {
66 fontSize : 'x-large' ,
77 content : oldAttributes . text ,
88 align : oldAttributes . contentAlign ,
9+ style : { spacing : { margin : { top : '0' , bottom : '0' } } } ,
910 }
1011 } ,
1112}
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import schema from './schema'
1515import metadata from './block.json'
1616import example from './example'
1717import deprecated from './deprecated'
18+ import substitute from './substitute'
1819
1920export const settings = {
2021 ...metadata ,
@@ -29,4 +30,5 @@ export const settings = {
2930 deprecated,
3031 edit,
3132 save,
33+ substitute,
3234}
Original file line number Diff line number Diff line change 1+ export const substitute = {
2+ from : 'stackable/number-box' ,
3+ to : 'core/paragraph' ,
4+ transform : oldAttributes => {
5+ return {
6+ fontSize : 'xx-large' ,
7+ content : oldAttributes . text ,
8+ align : oldAttributes . contentAlign ,
9+ style : { spacing : { margin : { top : '0' , bottom : '0' } } } ,
10+ }
11+ } ,
12+ }
13+
14+ export default substitute
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import save from './save'
1111import schema from './schema'
1212import example from './example'
1313import deprecated from './deprecated'
14+ import substitute from './substitute'
1415
1516/**
1617 * External dependencies
@@ -40,4 +41,5 @@ export const settings = {
4041 deprecated,
4142 edit,
4243 save,
44+ substitute,
4345}
Original file line number Diff line number Diff line change 1+ export const substitute = {
2+ from : 'stackable/team-member' ,
3+ variants : [ ] ,
4+ to : 'stackable/columns' ,
5+ transform : ( oldAttributes , innerBlocks ) => {
6+ return [ 'stackable/columns' ,
7+ { } ,
8+ [
9+ [ 'stackable/column' ,
10+ { } ,
11+ innerBlocks ,
12+ ] ,
13+ ] ,
14+ ]
15+ } ,
16+ }
17+
18+ export default substitute
You can’t perform that action at this time.
0 commit comments