mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-14 22:56:19 +01:00
1de40f71be
This patch, somewhat small brings a lot to WordPress. This includes features like: - DataViews. - Customization tools like box shadow, background size and repeat. - UI improvements in the site editor. - Preferences sharing between the post and site editors. - Unified panels and editors between post and site editors. - Improved template mode in the post editor. - Iterations to multiple interactive blocks. - Preparing the blocks and UI for pattern overrides. - and a lot more. Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj. See #60315. Built from https://develop.svn.wordpress.org/trunk@57377 git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
144 lines
2.7 KiB
JSON
144 lines
2.7 KiB
JSON
{
|
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
"apiVersion": 3,
|
|
"name": "core/gallery",
|
|
"title": "Gallery",
|
|
"category": "media",
|
|
"description": "Display multiple images in a rich gallery.",
|
|
"keywords": [ "images", "photos" ],
|
|
"textdomain": "default",
|
|
"attributes": {
|
|
"images": {
|
|
"type": "array",
|
|
"default": [],
|
|
"source": "query",
|
|
"selector": ".blocks-gallery-item",
|
|
"query": {
|
|
"url": {
|
|
"type": "string",
|
|
"source": "attribute",
|
|
"selector": "img",
|
|
"attribute": "src"
|
|
},
|
|
"fullUrl": {
|
|
"type": "string",
|
|
"source": "attribute",
|
|
"selector": "img",
|
|
"attribute": "data-full-url"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"source": "attribute",
|
|
"selector": "img",
|
|
"attribute": "data-link"
|
|
},
|
|
"alt": {
|
|
"type": "string",
|
|
"source": "attribute",
|
|
"selector": "img",
|
|
"attribute": "alt",
|
|
"default": ""
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"source": "attribute",
|
|
"selector": "img",
|
|
"attribute": "data-id"
|
|
},
|
|
"caption": {
|
|
"type": "rich-text",
|
|
"source": "rich-text",
|
|
"selector": ".blocks-gallery-item__caption"
|
|
}
|
|
}
|
|
},
|
|
"ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "number"
|
|
},
|
|
"default": []
|
|
},
|
|
"shortCodeTransforms": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object"
|
|
},
|
|
"default": []
|
|
},
|
|
"columns": {
|
|
"type": "number",
|
|
"minimum": 1,
|
|
"maximum": 8
|
|
},
|
|
"caption": {
|
|
"type": "rich-text",
|
|
"source": "rich-text",
|
|
"selector": ".blocks-gallery-caption"
|
|
},
|
|
"imageCrop": {
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"randomOrder": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"fixedHeight": {
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"linkTarget": {
|
|
"type": "string"
|
|
},
|
|
"linkTo": {
|
|
"type": "string"
|
|
},
|
|
"sizeSlug": {
|
|
"type": "string",
|
|
"default": "large"
|
|
},
|
|
"allowResize": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"providesContext": {
|
|
"allowResize": "allowResize",
|
|
"imageCrop": "imageCrop",
|
|
"fixedHeight": "fixedHeight"
|
|
},
|
|
"supports": {
|
|
"anchor": true,
|
|
"align": true,
|
|
"html": false,
|
|
"units": [ "px", "em", "rem", "vh", "vw" ],
|
|
"spacing": {
|
|
"margin": true,
|
|
"padding": true,
|
|
"blockGap": [ "horizontal", "vertical" ],
|
|
"__experimentalSkipSerialization": [ "blockGap" ],
|
|
"__experimentalDefaultControls": {
|
|
"blockGap": true,
|
|
"margin": false,
|
|
"padding": false
|
|
}
|
|
},
|
|
"color": {
|
|
"text": false,
|
|
"background": true,
|
|
"gradients": true
|
|
},
|
|
"layout": {
|
|
"allowSwitching": false,
|
|
"allowInheriting": false,
|
|
"allowEditing": false,
|
|
"default": {
|
|
"type": "flex"
|
|
}
|
|
}
|
|
},
|
|
"editorStyle": "wp-block-gallery-editor",
|
|
"style": "wp-block-gallery"
|
|
}
|