wp/wp-includes/blocks/gallery/block.json
changeset 16 a86126ab1dd4
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
       
     1 {
       
     2 	"name": "core/gallery",
       
     3 	"category": "media",
       
     4 	"attributes": {
       
     5 		"images": {
       
     6 			"type": "array",
       
     7 			"default": [],
       
     8 			"source": "query",
       
     9 			"selector": ".blocks-gallery-item",
       
    10 			"query": {
       
    11 				"url": {
       
    12 					"type": "string",
       
    13 					"source": "attribute",
       
    14 					"selector": "img",
       
    15 					"attribute": "src"
       
    16 				},
       
    17 				"fullUrl": {
       
    18 					"type": "string",
       
    19 					"source": "attribute",
       
    20 					"selector": "img",
       
    21 					"attribute": "data-full-url"
       
    22 				},
       
    23 				"link": {
       
    24 					"type": "string",
       
    25 					"source": "attribute",
       
    26 					"selector": "img",
       
    27 					"attribute": "data-link"
       
    28 				},
       
    29 				"alt": {
       
    30 					"type": "string",
       
    31 					"source": "attribute",
       
    32 					"selector": "img",
       
    33 					"attribute": "alt",
       
    34 					"default": ""
       
    35 				},
       
    36 				"id": {
       
    37 					"type": "string",
       
    38 					"source": "attribute",
       
    39 					"selector": "img",
       
    40 					"attribute": "data-id"
       
    41 				},
       
    42 				"caption": {
       
    43 					"type": "string",
       
    44 					"source": "html",
       
    45 					"selector": ".blocks-gallery-item__caption"
       
    46 				}
       
    47 			}
       
    48 		},
       
    49 		"ids": {
       
    50 			"type": "array",
       
    51 			"items": {
       
    52 				"type": "number"
       
    53 			},
       
    54 			"default": []
       
    55 		},
       
    56 		"columns": {
       
    57 			"type": "number",
       
    58 			"minimum": 1,
       
    59 			"maximum": 8
       
    60 		},
       
    61 		"caption": {
       
    62 			"type": "string",
       
    63 			"source": "html",
       
    64 			"selector": ".blocks-gallery-caption"
       
    65 		},
       
    66 		"imageCrop": {
       
    67 			"type": "boolean",
       
    68 			"default": true
       
    69 		},
       
    70 		"linkTo": {
       
    71 			"type": "string",
       
    72 			"default": "none"
       
    73 		},
       
    74 		"sizeSlug": {
       
    75 			"type": "string",
       
    76 			"default": "large"
       
    77 		}
       
    78 	},
       
    79 	"supports": {
       
    80 		"anchor": true,
       
    81 		"align": true
       
    82 	}
       
    83 }