| 1 |
{ |
| 2 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 |
"apiVersion": 3, |
| 4 |
"name": "core/post-featured-image", |
| 5 |
"title": "Featured Image", |
| 6 |
"category": "theme", |
| 7 |
"description": "Display a post's featured image.", |
| 8 |
"textdomain": "default", |
| 9 |
"attributes": { |
| 10 |
"isLink": { |
| 11 |
"type": "boolean", |
| 12 |
"default": false, |
| 13 |
"role": "content" |
| 14 |
}, |
| 15 |
"aspectRatio": { |
| 16 |
"type": "string" |
| 17 |
}, |
| 18 |
"width": { |
| 19 |
"type": "string" |
| 20 |
}, |
| 21 |
"height": { |
| 22 |
"type": "string" |
| 23 |
}, |
| 24 |
"scale": { |
| 25 |
"type": "string", |
| 26 |
"default": "cover" |
| 27 |
}, |
| 28 |
"sizeSlug": { |
| 29 |
"type": "string" |
| 30 |
}, |
| 31 |
"rel": { |
| 32 |
"type": "string", |
| 33 |
"attribute": "rel", |
| 34 |
"default": "", |
| 35 |
"role": "content" |
| 36 |
}, |
| 37 |
"linkTarget": { |
| 38 |
"type": "string", |
| 39 |
"default": "_self", |
| 40 |
"role": "content" |
| 41 |
}, |
| 42 |
"overlayColor": { |
| 43 |
"type": "string" |
| 44 |
}, |
| 45 |
"customOverlayColor": { |
| 46 |
"type": "string" |
| 47 |
}, |
| 48 |
"dimRatio": { |
| 49 |
"type": "number", |
| 50 |
"default": 0 |
| 51 |
}, |
| 52 |
"gradient": { |
| 53 |
"type": "string" |
| 54 |
}, |
| 55 |
"customGradient": { |
| 56 |
"type": "string" |
| 57 |
}, |
| 58 |
"useFirstImageFromPost": { |
| 59 |
"type": "boolean", |
| 60 |
"default": false |
| 61 |
} |
| 62 |
}, |
| 63 |
"usesContext": [ "postId", "postType", "queryId" ], |
| 64 |
"example": { |
| 65 |
"viewportWidth": 350 |
| 66 |
}, |
| 67 |
"supports": { |
| 68 |
"anchor": true, |
| 69 |
"align": [ "left", "right", "center", "wide", "full" ], |
| 70 |
"color": { |
| 71 |
"text": false, |
| 72 |
"background": false |
| 73 |
}, |
| 74 |
"__experimentalBorder": { |
| 75 |
"color": true, |
| 76 |
"radius": true, |
| 77 |
"width": true, |
| 78 |
"__experimentalSkipSerialization": true, |
| 79 |
"__experimentalDefaultControls": { |
| 80 |
"color": true, |
| 81 |
"radius": true, |
| 82 |
"width": true |
| 83 |
} |
| 84 |
}, |
| 85 |
"filter": { |
| 86 |
"duotone": true |
| 87 |
}, |
| 88 |
"shadow": { |
| 89 |
"__experimentalSkipSerialization": true |
| 90 |
}, |
| 91 |
"html": false, |
| 92 |
"spacing": { |
| 93 |
"margin": true, |
| 94 |
"padding": true |
| 95 |
}, |
| 96 |
"interactivity": { |
| 97 |
"clientNavigation": true |
| 98 |
} |
| 99 |
}, |
| 100 |
"selectors": { |
| 101 |
"border": ".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay", |
| 102 |
"shadow": ".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder", |
| 103 |
"filter": { |
| 104 |
"duotone": ".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before" |
| 105 |
} |
| 106 |
}, |
| 107 |
"editorStyle": "wp-block-post-featured-image-editor", |
| 108 |
"style": "wp-block-post-featured-image" |
| 109 |
} |
| 110 |
|