wp/wp-includes/blocks/gallery/block.json
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 {
     1 {
     2 	"$schema": "https://schemas.wp.org/trunk/block.json",
     2 	"$schema": "https://schemas.wp.org/trunk/block.json",
     3 	"apiVersion": 2,
     3 	"apiVersion": 3,
     4 	"name": "core/gallery",
     4 	"name": "core/gallery",
     5 	"title": "Gallery",
     5 	"title": "Gallery",
     6 	"category": "media",
     6 	"category": "media",
       
     7 	"allowedBlocks": [ "core/image" ],
     7 	"description": "Display multiple images in a rich gallery.",
     8 	"description": "Display multiple images in a rich gallery.",
     8 	"keywords": [ "images", "photos" ],
     9 	"keywords": [ "images", "photos" ],
     9 	"textdomain": "default",
    10 	"textdomain": "default",
    10 	"attributes": {
    11 	"attributes": {
    11 		"images": {
    12 		"images": {
    44 					"source": "attribute",
    45 					"source": "attribute",
    45 					"selector": "img",
    46 					"selector": "img",
    46 					"attribute": "data-id"
    47 					"attribute": "data-id"
    47 				},
    48 				},
    48 				"caption": {
    49 				"caption": {
    49 					"type": "string",
    50 					"type": "rich-text",
    50 					"source": "html",
    51 					"source": "rich-text",
    51 					"selector": ".blocks-gallery-item__caption"
    52 					"selector": ".blocks-gallery-item__caption"
    52 				}
    53 				}
    53 			}
    54 			}
    54 		},
    55 		},
    55 		"ids": {
    56 		"ids": {
    59 			},
    60 			},
    60 			"default": []
    61 			"default": []
    61 		},
    62 		},
    62 		"shortCodeTransforms": {
    63 		"shortCodeTransforms": {
    63 			"type": "array",
    64 			"type": "array",
    64 			"default": [],
       
    65 			"items": {
    65 			"items": {
    66 				"type": "object"
    66 				"type": "object"
    67 			}
    67 			},
       
    68 			"default": []
    68 		},
    69 		},
    69 		"columns": {
    70 		"columns": {
    70 			"type": "number",
    71 			"type": "number",
    71 			"minimum": 1,
    72 			"minimum": 1,
    72 			"maximum": 8
    73 			"maximum": 8
    73 		},
    74 		},
    74 		"caption": {
    75 		"caption": {
    75 			"type": "string",
    76 			"type": "rich-text",
    76 			"source": "html",
    77 			"source": "rich-text",
    77 			"selector": ".blocks-gallery-caption"
    78 			"selector": ".blocks-gallery-caption"
    78 		},
    79 		},
    79 		"imageCrop": {
    80 		"imageCrop": {
    80 			"type": "boolean",
    81 			"type": "boolean",
    81 			"default": true
    82 			"default": true
       
    83 		},
       
    84 		"randomOrder": {
       
    85 			"type": "boolean",
       
    86 			"default": false
    82 		},
    87 		},
    83 		"fixedHeight": {
    88 		"fixedHeight": {
    84 			"type": "boolean",
    89 			"type": "boolean",
    85 			"default": true
    90 			"default": true
    86 		},
    91 		},
   108 		"anchor": true,
   113 		"anchor": true,
   109 		"align": true,
   114 		"align": true,
   110 		"html": false,
   115 		"html": false,
   111 		"units": [ "px", "em", "rem", "vh", "vw" ],
   116 		"units": [ "px", "em", "rem", "vh", "vw" ],
   112 		"spacing": {
   117 		"spacing": {
   113 			"blockGap": true,
   118 			"margin": true,
       
   119 			"padding": true,
       
   120 			"blockGap": [ "horizontal", "vertical" ],
   114 			"__experimentalSkipSerialization": [ "blockGap" ],
   121 			"__experimentalSkipSerialization": [ "blockGap" ],
   115 			"__experimentalDefaultControls": {
   122 			"__experimentalDefaultControls": {
   116 				"blockGap": true
   123 				"blockGap": true,
       
   124 				"margin": false,
       
   125 				"padding": false
   117 			}
   126 			}
   118 		},
   127 		},
   119 		"__experimentalLayout": {
   128 		"color": {
       
   129 			"text": false,
       
   130 			"background": true,
       
   131 			"gradients": true
       
   132 		},
       
   133 		"layout": {
   120 			"allowSwitching": false,
   134 			"allowSwitching": false,
   121 			"allowInheriting": false,
   135 			"allowInheriting": false,
   122 			"allowEditing": false,
   136 			"allowEditing": false,
   123 			"default": {
   137 			"default": {
   124 				"type": "flex"
   138 				"type": "flex"
   125 			}
   139 			}
       
   140 		},
       
   141 		"interactivity": {
       
   142 			"clientNavigation": true
   126 		}
   143 		}
   127 	},
   144 	},
   128 	"editorStyle": "wp-block-gallery-editor",
   145 	"editorStyle": "wp-block-gallery-editor",
   129 	"style": "wp-block-gallery"
   146 	"style": "wp-block-gallery"
   130 }
   147 }