Skip to content

Commit f277554

Browse files
committed
Merge branch 'feat-granular-plugin-setting' of https://github.com/gambitph/Stackable into feat-granular-plugin-setting
2 parents 75f7fc4 + 2e33a46 commit f277554

File tree

20 files changed

+219
-1
lines changed

20 files changed

+219
-1
lines changed

src/block/card/substitute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const substitute = {
33
transform: ( oldAttributes, innerBlocks ) => {
44
return [
55
'stackable/columns',
6-
{ uniqueId: 'test' },
6+
{},
77
[
88
[
99
'stackable/column',

src/block/carousel/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import schema from './schema'
1515
import metadata from './block.json'
1616
import example from './example'
1717
import deprecated from './deprecated'
18+
import substitute from './substitute'
1819

1920
export const settings = {
2021
...metadata,
@@ -34,4 +35,5 @@ export const settings = {
3435
deprecated,
3536
edit,
3637
save,
38+
substitute,
3739
}

src/block/carousel/substitute.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export const substitute = {
2+
from: 'stackable/carousel',
3+
variants: [],
4+
to: [ 'stackable/columns' ],
5+
transform: ( oldAttributes, innerBlocks ) => {
6+
return [
7+
'stackable/columns',
8+
{},
9+
innerBlocks,
10+
]
11+
},
12+
}
13+
14+
export default substitute

src/block/countdown/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import save from './save'
1515
import schema from './schema'
1616
import metadata from './block.json'
1717
import deprecated from './deprecated'
18+
import substitute from './substitute'
1819

1920
export const settings = {
2021
...metadata,
@@ -29,5 +30,6 @@ export const settings = {
2930
align: [ 'center', 'wide', 'full' ],
3031
spacing: true,
3132
},
33+
substitute,
3234
}
3335

src/block/countdown/substitute.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
export const substitute = {
2+
from: 'stackable/countdown',
3+
variations: [],
4+
to: 'stackable/columns',
5+
transform: () => {
6+
return [
7+
'stackable/columns',
8+
{},
9+
[
10+
[
11+
'stackable/column',
12+
{ align: 'center' },
13+
[
14+
[ 'core/text', {
15+
fontSize: 'x-large',
16+
content: '3',
17+
align: 'center',
18+
style: { spacing: { margin: { top: '0', bottom: '0' } } },
19+
} ],
20+
[ 'core/text', {
21+
content: 'Days',
22+
align: 'center',
23+
style: { spacing: { margin: { top: '0', bottom: '0' } } },
24+
} ],
25+
],
26+
],
27+
[
28+
'stackable/column',
29+
{ align: 'center' },
30+
[
31+
[ 'core/text', {
32+
fontSize: 'x-large',
33+
content: '16',
34+
align: 'center',
35+
style: { spacing: { margin: { top: '0', bottom: '0' } } },
36+
} ],
37+
[ 'core/text', {
38+
content: 'Hours',
39+
align: 'center',
40+
style: { spacing: { margin: { top: '0', bottom: '0' } } },
41+
} ],
42+
],
43+
],
44+
],
45+
]
46+
},
47+
}
48+
49+
export default substitute

src/block/expand/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import schema from './schema'
1616
import metadata from './block.json'
1717
import example from './example'
1818
import deprecated from './deprecated'
19+
import substitute from './substitute'
1920

2021
/**
2122
* WordPress dependencies
@@ -37,4 +38,5 @@ export const settings = {
3738
deprecated,
3839
edit,
3940
save,
41+
substitute,
4042
}

src/block/expand/substitute.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export const substitute = {
2+
from: 'stackable/expand',
3+
to: 'stackable/text',
4+
transform: ( oldAttributes, innerBlocks ) => {
5+
return {
6+
text: innerBlocks[ 2 ][ 1 ].text,
7+
}
8+
},
9+
}
10+
11+
export default substitute

src/block/feature-grid/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import schema from './schema'
1717
import metadata from './block.json'
1818
import example from './example'
1919
import deprecated from './deprecated'
20+
import substitute from './substitute'
2021

2122
/**
2223
* WordPress dependencies
@@ -41,4 +42,5 @@ export const settings = {
4142
variations,
4243
edit,
4344
save,
45+
substitute,
4446
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export const substitute = {
2+
from: 'stackable/feature-grid',
3+
variants: [],
4+
to: [ 'stackable/columns' ],
5+
transform: ( oldAttributes, innerBlocks ) => {
6+
return [
7+
'stackable/columns',
8+
{},
9+
innerBlocks,
10+
]
11+
},
12+
}
13+
14+
export default substitute

src/block/feature/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import schema from './schema'
1717
import metadata from './block.json'
1818
import example from './example'
1919
import deprecated from './deprecated'
20+
import substitute from './substitute'
2021

2122
/**
2223
* WordPress dependencies
@@ -42,4 +43,5 @@ export const settings = {
4243
variations,
4344
edit,
4445
save,
46+
substitute,
4547
}

0 commit comments

Comments
 (0)