wp/wp-includes/blocks/cover/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/cover",
     4 	"name": "core/cover",
     5 	"title": "Cover",
     5 	"title": "Cover",
     6 	"category": "media",
     6 	"category": "media",
     7 	"description": "Add an image or video with a text overlay — great for headers.",
     7 	"description": "Add an image or video with a text overlay.",
     8 	"textdomain": "default",
     8 	"textdomain": "default",
     9 	"attributes": {
     9 	"attributes": {
    10 		"url": {
    10 		"url": {
    11 			"type": "string"
    11 			"type": "string"
    12 		},
    12 		},
    17 		"id": {
    17 		"id": {
    18 			"type": "number"
    18 			"type": "number"
    19 		},
    19 		},
    20 		"alt": {
    20 		"alt": {
    21 			"type": "string",
    21 			"type": "string",
    22 			"source": "attribute",
       
    23 			"selector": "img",
       
    24 			"attribute": "alt",
       
    25 			"default": ""
    22 			"default": ""
    26 		},
    23 		},
    27 		"hasParallax": {
    24 		"hasParallax": {
    28 			"type": "boolean",
    25 			"type": "boolean",
    29 			"default": false
    26 			"default": false
    39 		"overlayColor": {
    36 		"overlayColor": {
    40 			"type": "string"
    37 			"type": "string"
    41 		},
    38 		},
    42 		"customOverlayColor": {
    39 		"customOverlayColor": {
    43 			"type": "string"
    40 			"type": "string"
       
    41 		},
       
    42 		"isUserOverlayColor": {
       
    43 			"type": "boolean"
    44 		},
    44 		},
    45 		"backgroundType": {
    45 		"backgroundType": {
    46 			"type": "string",
    46 			"type": "string",
    47 			"default": "image"
    47 			"default": "image"
    48 		},
    48 		},
    71 		"allowedBlocks": {
    71 		"allowedBlocks": {
    72 			"type": "array"
    72 			"type": "array"
    73 		},
    73 		},
    74 		"templateLock": {
    74 		"templateLock": {
    75 			"type": [ "string", "boolean" ],
    75 			"type": [ "string", "boolean" ],
    76 			"enum": [ "all", "insert", false ]
    76 			"enum": [ "all", "insert", "contentOnly", false ]
       
    77 		},
       
    78 		"tagName": {
       
    79 			"type": "string",
       
    80 			"default": "div"
    77 		}
    81 		}
    78 	},
    82 	},
    79 	"usesContext": [ "postId", "postType" ],
    83 	"usesContext": [ "postId", "postType" ],
    80 	"supports": {
    84 	"supports": {
    81 		"anchor": true,
    85 		"anchor": true,
    82 		"align": true,
    86 		"align": true,
    83 		"html": false,
    87 		"html": false,
       
    88 		"shadow": true,
    84 		"spacing": {
    89 		"spacing": {
    85 			"padding": true,
    90 			"padding": true,
       
    91 			"margin": [ "top", "bottom" ],
       
    92 			"blockGap": true,
    86 			"__experimentalDefaultControls": {
    93 			"__experimentalDefaultControls": {
    87 				"padding": true
    94 				"padding": true,
       
    95 				"blockGap": true
       
    96 			}
       
    97 		},
       
    98 		"__experimentalBorder": {
       
    99 			"color": true,
       
   100 			"radius": true,
       
   101 			"style": true,
       
   102 			"width": true,
       
   103 			"__experimentalDefaultControls": {
       
   104 				"color": true,
       
   105 				"radius": true,
       
   106 				"style": true,
       
   107 				"width": true
    88 			}
   108 			}
    89 		},
   109 		},
    90 		"color": {
   110 		"color": {
    91 			"__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
   111 			"__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
    92 			"text": false,
   112 			"heading": true,
    93 			"background": false
   113 			"text": true,
       
   114 			"background": false,
       
   115 			"__experimentalSkipSerialization": [ "gradients" ],
       
   116 			"enableContrastChecker": false
       
   117 		},
       
   118 		"dimensions": {
       
   119 			"aspectRatio": true
       
   120 		},
       
   121 		"typography": {
       
   122 			"fontSize": true,
       
   123 			"lineHeight": true,
       
   124 			"__experimentalFontFamily": true,
       
   125 			"__experimentalFontWeight": true,
       
   126 			"__experimentalFontStyle": true,
       
   127 			"__experimentalTextTransform": true,
       
   128 			"__experimentalTextDecoration": true,
       
   129 			"__experimentalLetterSpacing": true,
       
   130 			"__experimentalDefaultControls": {
       
   131 				"fontSize": true
       
   132 			}
       
   133 		},
       
   134 		"layout": {
       
   135 			"allowJustification": false
       
   136 		},
       
   137 		"interactivity": {
       
   138 			"clientNavigation": true
    94 		}
   139 		}
    95 	},
   140 	},
    96 	"editorStyle": "wp-block-cover-editor",
   141 	"editorStyle": "wp-block-cover-editor",
    97 	"style": "wp-block-cover"
   142 	"style": "wp-block-cover"
    98 }
   143 }