equal
deleted
inserted
replaced
1 { |
1 { |
|
2 "$schema": "https://schemas.wp.org/trunk/block.json", |
2 "apiVersion": 2, |
3 "apiVersion": 2, |
3 "name": "core/cover", |
4 "name": "core/cover", |
4 "title": "Cover", |
5 "title": "Cover", |
5 "category": "media", |
6 "category": "media", |
6 "description": "Add an image or video with a text overlay — great for headers.", |
7 "description": "Add an image or video with a text overlay — great for headers.", |
7 "textdomain": "default", |
8 "textdomain": "default", |
8 "attributes": { |
9 "attributes": { |
9 "url": { |
10 "url": { |
10 "type": "string" |
11 "type": "string" |
11 }, |
12 }, |
|
13 "useFeaturedImage": { |
|
14 "type": "boolean", |
|
15 "default": false |
|
16 }, |
12 "id": { |
17 "id": { |
13 "type": "number" |
18 "type": "number" |
|
19 }, |
|
20 "alt": { |
|
21 "type": "string", |
|
22 "source": "attribute", |
|
23 "selector": "img", |
|
24 "attribute": "alt", |
|
25 "default": "" |
14 }, |
26 }, |
15 "hasParallax": { |
27 "hasParallax": { |
16 "type": "boolean", |
28 "type": "boolean", |
17 "default": false |
29 "default": false |
18 }, |
30 }, |
20 "type": "boolean", |
32 "type": "boolean", |
21 "default": false |
33 "default": false |
22 }, |
34 }, |
23 "dimRatio": { |
35 "dimRatio": { |
24 "type": "number", |
36 "type": "number", |
25 "default": 50 |
37 "default": 100 |
26 }, |
38 }, |
27 "overlayColor": { |
39 "overlayColor": { |
28 "type": "string" |
40 "type": "string" |
29 }, |
41 }, |
30 "customOverlayColor": { |
42 "customOverlayColor": { |
49 "customGradient": { |
61 "customGradient": { |
50 "type": "string" |
62 "type": "string" |
51 }, |
63 }, |
52 "contentPosition": { |
64 "contentPosition": { |
53 "type": "string" |
65 "type": "string" |
|
66 }, |
|
67 "isDark": { |
|
68 "type": "boolean", |
|
69 "default": true |
|
70 }, |
|
71 "allowedBlocks": { |
|
72 "type": "array" |
|
73 }, |
|
74 "templateLock": { |
|
75 "type": [ "string", "boolean" ], |
|
76 "enum": [ "all", "insert", false ] |
54 } |
77 } |
55 }, |
78 }, |
|
79 "usesContext": [ "postId", "postType" ], |
56 "supports": { |
80 "supports": { |
57 "anchor": true, |
81 "anchor": true, |
58 "align": true, |
82 "align": true, |
59 "html": false, |
83 "html": false, |
60 "spacing": { |
84 "spacing": { |
61 "padding": true |
85 "padding": true, |
|
86 "__experimentalDefaultControls": { |
|
87 "padding": true |
|
88 } |
62 }, |
89 }, |
63 "color": { |
90 "color": { |
64 "__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background", |
91 "__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background", |
65 "text": false, |
92 "text": false, |
66 "background": false |
93 "background": false |