diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 8d8b05c712f665..441a2cbd8cc891 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -46,8 +46,8 @@ Displays an accordion panel. ([Source](https://github.com/WordPress/gutenberg/tr - **Name:** core/accordion-panel - **Category:** design - **Parent:** core/accordion-item -- **Supports:** color (background, gradients, text), contentRole, interactivity, shadow, spacing (blockGap, padding), typography (fontSize, lineHeight), ~~blockVisibility~~, ~~html~~ -- **Attributes:** allowedBlocks, isSelected, openByDefault, templateLock +- **Supports:** allowedBlocks, color (background, gradients, text), contentRole, interactivity, shadow, spacing (blockGap, padding), typography (fontSize, lineHeight), ~~blockVisibility~~, ~~html~~ +- **Attributes:** isSelected, openByDefault, templateLock ## Archives @@ -147,8 +147,8 @@ A single column within a columns block. ([Source](https://github.com/WordPress/g - **Name:** core/column - **Category:** design - **Parent:** core/columns -- **Supports:** anchor, color (background, button, gradients, heading, link, text), interactivity (clientNavigation), layout, shadow, spacing (blockGap, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ -- **Attributes:** allowedBlocks, templateLock, verticalAlignment, width +- **Supports:** allowedBlocks, anchor, color (background, button, gradients, heading, link, text), interactivity (clientNavigation), layout, shadow, spacing (blockGap, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ +- **Attributes:** templateLock, verticalAlignment, width ## Columns @@ -295,8 +295,8 @@ Add an image or video with a text overlay. ([Source](https://github.com/WordPres - **Name:** core/cover - **Category:** media -- **Supports:** align, anchor, color (heading, text, ~~background~~, ~~enableContrastChecker~~), dimensions (aspectRatio), filter (duotone), interactivity (clientNavigation), layout (~~allowJustification~~), shadow, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** allowedBlocks, alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, isUserOverlayColor, minHeight, minHeightUnit, overlayColor, poster, sizeSlug, tagName, templateLock, url, useFeaturedImage +- **Supports:** align, allowedBlocks, anchor, color (heading, text, ~~background~~, ~~enableContrastChecker~~), dimensions (aspectRatio), filter (duotone), interactivity (clientNavigation), layout (~~allowJustification~~), shadow, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Attributes:** alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, isUserOverlayColor, minHeight, minHeightUnit, overlayColor, poster, sizeSlug, tagName, templateLock, url, useFeaturedImage ## Details @@ -304,8 +304,8 @@ Hide and show additional content. ([Source](https://github.com/WordPress/gutenbe - **Name:** core/details - **Category:** text -- **Supports:** align (full, wide), anchor, color (background, gradients, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** allowedBlocks, name, placeholder, showContent, summary +- **Supports:** align (full, wide), allowedBlocks, anchor, color (background, gradients, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Attributes:** name, placeholder, showContent, summary ## Embed @@ -494,8 +494,8 @@ Set media and words side-by-side for a richer layout. ([Source](https://github.c - **Name:** core/media-text - **Category:** media -- **Supports:** align (full, wide), anchor, color (background, gradients, heading, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** align, allowedBlocks, focalPoint, href, imageFill, isStackedOnMobile, linkClass, linkDestination, linkTarget, mediaAlt, mediaId, mediaLink, mediaPosition, mediaSizeSlug, mediaType, mediaUrl, mediaWidth, rel, useFeaturedImage, verticalAlignment +- **Supports:** align (full, wide), allowedBlocks, anchor, color (background, gradients, heading, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Attributes:** align, focalPoint, href, imageFill, isStackedOnMobile, linkClass, linkDestination, linkTarget, mediaAlt, mediaId, mediaLink, mediaPosition, mediaSizeSlug, mediaType, mediaUrl, mediaWidth, rel, useFeaturedImage, verticalAlignment ## Unsupported @@ -841,7 +841,7 @@ Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Ju - **Name:** core/quote - **Category:** text -- **Supports:** align (full, left, right, wide), anchor, background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, left, right, wide), allowedBlocks, anchor, background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** citation, textAlign, value ## Read More diff --git a/packages/block-library/src/accordion-panel/block.json b/packages/block-library/src/accordion-panel/block.json index fbbb532b7ce306..cf1cd56d37d269 100644 --- a/packages/block-library/src/accordion-panel/block.json +++ b/packages/block-library/src/accordion-panel/block.json @@ -48,12 +48,10 @@ }, "shadow": true, "blockVisibility": false, - "contentRole": true + "contentRole": true, + "allowedBlocks": true }, "attributes": { - "allowedBlocks": { - "type": "array" - }, "templateLock": { "type": [ "string", "boolean" ], "enum": [ "all", "insert", "contentOnly", false ], diff --git a/packages/block-library/src/column/block.json b/packages/block-library/src/column/block.json index 33bd528b356880..e842baac05dcf0 100644 --- a/packages/block-library/src/column/block.json +++ b/packages/block-library/src/column/block.json @@ -14,9 +14,6 @@ "width": { "type": "string" }, - "allowedBlocks": { - "type": "array" - }, "templateLock": { "type": [ "string", "boolean" ], "enum": [ "all", "insert", "contentOnly", false ] @@ -74,6 +71,7 @@ "layout": true, "interactivity": { "clientNavigation": true - } + }, + "allowedBlocks": true } } diff --git a/packages/block-library/src/cover/block.json b/packages/block-library/src/cover/block.json index 75ba7c66834a43..97095ab4b95152 100644 --- a/packages/block-library/src/cover/block.json +++ b/packages/block-library/src/cover/block.json @@ -69,9 +69,6 @@ "type": "boolean", "default": true }, - "allowedBlocks": { - "type": "array" - }, "templateLock": { "type": [ "string", "boolean" ], "enum": [ "all", "insert", "contentOnly", false ] @@ -148,7 +145,8 @@ }, "filter": { "duotone": true - } + }, + "allowedBlocks": true }, "selectors": { "filter": { diff --git a/packages/block-library/src/details/block.json b/packages/block-library/src/details/block.json index 434a30203e8c68..27d71c4a24d36c 100644 --- a/packages/block-library/src/details/block.json +++ b/packages/block-library/src/details/block.json @@ -24,9 +24,6 @@ "attribute": "name", "selector": ".wp-block-details" }, - "allowedBlocks": { - "type": "array" - }, "placeholder": { "type": "string" } @@ -76,7 +73,8 @@ }, "interactivity": { "clientNavigation": true - } + }, + "allowedBlocks": true }, "editorStyle": "wp-block-details-editor", "style": "wp-block-details" diff --git a/packages/block-library/src/media-text/block.json b/packages/block-library/src/media-text/block.json index 0c2cfc4a14995a..249a5d43032c8c 100644 --- a/packages/block-library/src/media-text/block.json +++ b/packages/block-library/src/media-text/block.json @@ -90,9 +90,6 @@ "focalPoint": { "type": "object" }, - "allowedBlocks": { - "type": "array" - }, "useFeaturedImage": { "type": "boolean", "default": false @@ -143,7 +140,8 @@ }, "interactivity": { "clientNavigation": true - } + }, + "allowedBlocks": true }, "editorStyle": "wp-block-media-text-editor", "style": "wp-block-media-text" diff --git a/packages/block-library/src/quote/block.json b/packages/block-library/src/quote/block.json index 2ae37f9f36f766..52609ee57d12ac 100644 --- a/packages/block-library/src/quote/block.json +++ b/packages/block-library/src/quote/block.json @@ -89,7 +89,8 @@ }, "interactivity": { "clientNavigation": true - } + }, + "allowedBlocks": true }, "styles": [ { diff --git a/packages/block-library/src/quote/edit.js b/packages/block-library/src/quote/edit.js index 66f8f9d66c85ae..e26cc4693ed35a 100644 --- a/packages/block-library/src/quote/edit.js +++ b/packages/block-library/src/quote/edit.js @@ -75,7 +75,7 @@ export default function QuoteEdit( { style, isSelected, } ) { - const { textAlign } = attributes; + const { textAlign, allowedBlocks } = attributes; useMigrateOnLoad( attributes, clientId ); @@ -90,6 +90,7 @@ export default function QuoteEdit( { templateInsertUpdatesSelection: true, __experimentalCaptureToolbars: true, renderAppender: false, + allowedBlocks, } ); return (